☞ Following are the topics to be covered :
1. Delete particular record. 2. Delete all records. 3. Truncate command. 4. Difference between Delete and Truncate statement.
☞ To remove record from a table in RDBMS, we use DELETE command.
☞ It is used to delete the record from a table.
☞ Syntax :
☞ Example :
☞ Example :
☞ It is used to delete all the records from a table.
☞ It free the space containing the table for reuse.
☞ Syntax :
☞ Example :
| S.No. | DELETE Statement | TRUNCATE Statement |
|---|---|---|
| 1. | It is used to delete only the rows from a table. | It is used to delete all the rows from the table based on given condition. |
| 2. | It does not free up the space contating the table. | It free the space containing the table for reuse. |