Used for deleting rows from a table. The where section should give the criteria for deleting records, for example the specific ID for the record could be used. Alternatively the criteria could be more complex and use multiple criteria.
DELETE FROM table WHERE column1=value1;
DELETE FROM table WHERE column1=value1 AND column2=value2;
- Not specifying which records to delete will result in every record being deleted
- The same can be achieved with 'DELETED * FROM table'
- This process cannot be undone
- Not to be confused with DROP, for deleting columns and tables.
All these questions will use this table called Employees: