INSERT INTO/ UPDATE / DELETE
Insert values into table for all columns
syntax
INSERT INTO TableName
VALUES(Value1, Value2, ... );
Insert values into table for certain columns
Syntax
INSERT INTO TableName(column1,column2,...)
VALUES(Value1,Value2,...);
Insert values from other table
syntax
INSERT INTO TableName(Column1, column2, ...)
SELECT Column1, column2, ...
FROM OtherTable
WHERE ...;
BE AWARE!!!!! WHERE statement is not needed AND you can also use the insert table syntax of this example
Update
The update statement is used for changing values of existing table records
Syntax
UPDATE TableName
SET Column1 = Value1, Column2 = Value2, ...
Where ...;
Delete
The delete stament is used for deleting existing records from table
Syntax
DELETE FROM TableName WHERE ...;
Last updated