- USE yourschema;
describe managers; - CREATE TABLE newtablename
SELECT * FROM existingtablename - By using a WHERE clause.
- TRUNCATE TABLE tablename;
- UPDATE table1 t1
INNER JOIN table2 t2
ON t1.id = t2.id
SET t1.col1 = t2.col1 - A grouping of one or more changes to the database.
- To start a transaction in MySQL, use the START TRANSACTION or BEGIN keywords. To commit the transaction, you use the COMMIT keyword. To roll back a transaction, use the ROLLBACK keyword.
- ALTER TABLE table1
ADD COLUMN col2 datatype constraint AFTER col1; - ALTER TABLE table1
CHANGE COLUMN col1 col1 newdatatype;
ALTER TABLE table1 - CHANGE COLUMN col1 col1a datatype;
- Tech Categories
- Best Sellers
- New Releases
- Books
- Videos
- Audiobooks
Tech Categories Popular Audiobooks
- Articles
- Newsletters
- Free Learning
You're reading from Learn SQL Database Programming
Josephine Bush has over 10 years experience as a Database Administrator. Her experience is extensive and broad-based, including in financial, business, and energy data systems using MySQL, SQL Server, Oracle, and PostgreSQL. She is a Microsoft Certified Solutions Expert: Data Management and Analytics. She holds a BS in Information Technology, an MBA in IT Management, and an MS in Data Analytics.
Read more about Josephine Bush
Unlock this book and the full library FREE for 7 days
Author (1)
Josephine Bush has over 10 years experience as a Database Administrator. Her experience is extensive and broad-based, including in financial, business, and energy data systems using MySQL, SQL Server, Oracle, and PostgreSQL. She is a Microsoft Certified Solutions Expert: Data Management and Analytics. She holds a BS in Information Technology, an MBA in IT Management, and an MS in Data Analytics.
Read more about Josephine Bush