DELETE is a DML(Data Manipulation Language) Statement.
- The DELETE is used to remove rows from a table. A WHERE clause can be used with delete statement to remove choice rows. If no WHERE condition is specified, all rows will be removed.
- After performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
- DELETE keeps records in buffers (temporary storage) till the first ROLLBACK or COMMIT.
- You can rollback after fired this command.
- DELETE FROM table_name;
- DELETE FROM table_name WHERE some_column=some_value;
Example:
- DELETE FROM student;
- DELETE FROM student WHERE name='JAK';