SQL and Databases For Web Development - SQL - Creating, Updating, and Deleting Data Cheatsheet - Codecademy
SQL and Databases For Web Development - SQL - Creating, Updating, and Deleting Data Cheatsheet - Codecademy
INSERT Statement
The INSERT INTO statement is used to add a new
record (row) to a table. -- Insert into columns in order:
It has two forms as shown: INSERT INTO table_name
VALUES (value1, value2);
● Insert into columns in order.
/
DELETE Statement
The DELETE statement is used to delete records
(rows) in a table. The WHERE clause speci es which
DELETE FROM table_name
record or records that should be deleted. If the WHERE some_column = some_value;
WHERE clause is omitted, all records will be deleted.
UPDATE Statement
The UPDATE statement is used to edit records (rows)
in a table. It includes a SET clause that indicates the
UPDATE table_name
SET column1 = value1, column2 = value2
column to edit and a WHERE clause for specifying the
record(s).
WHERE some_column = some_value;