## SQL Data Manipulation Language (DML) --- ## DML Statements * INSERT * UPDATE * DELETE * --- ## INSERT Statement * insert rows into existing table * best practice is give column order template and then rows --- ## INSERT Statement ```sql INSERT INTO Player (name, height, weight) VALUES ('Alice', 175, 70), ('Bob', 192, 90), ('Carol', 150, 60 ); ``` --- ## DELETE Statement * deletes rows from the named table * whithout a `WHERE` clause, it deletes all the rows * the `TRUNCATE TABLE` statment is a faster way to delete all rows --- ## DELETE Statement ```sql DELETE FROM Player; -- deletes all records ``` --- ## DELETE Statement ```sql DELETE FROM Player WHERE height < 180; ``` --- ## UPDATE Statement * updates columns of existing rows of the named table * each value can be given as an expression * without a `WHERE` clause, all rows are updated --- ## UPDATE Statement ```sql -- adds $10,000 to every player's salary UPDATE Player SET salary = salary + 10000; ``` --- ## UPDATE Statement ```sql UPDATE Player SET height=177,weight=70 WHERE id = 123; ```