DELETE
DELETE can be used to remove one or more records from the table. Delete is a DML statement.
Example:
DELETE FROM tbl_employee WHERE name='Rahul';
DELETE statement can also delete all the records from the table.
Example:
DELETE FROM tbl_employee WHERE 1;
TRUNCATE
The TRUNCATE statement always removes all the records from the table. TRUNCATE is a DDL statement.
Example:
TRUNCATE TABLE tbl_employee;
0 Comments