SQL Quick Reference III
SQL Quick Reference III
Delete a table
DROP TABLE table_name;
Data Manipulation Language
(SELECT, INSERT, UPDATE, DELETE)
INSERT Statement
Populate values for all the columns
INSERT INTO table_name
VALUES (value1, value2, value3, ...);
DELETE Statement
Populate selective columns
UPDATE Statement Delete rows in a table
INSERT INTO table_name (column1, column2
UPDATE table_name DELETE FROM table_name
, column3, ...)
VALUES (value1, value2, value3, ...); SET column1 = value1, column2 = value2, WHERE condition;
...
WHERE condition; Delete all data inside the table
Populate a table using another table /Bulk insert TRUNCATE TABLE table_name;
INSERT INTO table_name (column1, column2
, column3, ...)
SELECT (col1, col2, col3, ...)
FROM second_table;