1.

How do the commands DROP, TRUNCATE, and DELETE differ in SQL?

Answer»
DROPTRUNCATEDELETE
DROP is USED for deleting a database, table, or a viewTRUNCATE is used for deleting all ROWS of a tableDELETE can either delete all of the rows at once or ONE by one. i.e., we can use it according to our needs.
No data can be rollbackedNo data can be rollbackedData can be rollbacked
It is a Data Definition Language (DDL) commandIt is a Data Definition Language (DDL) commandIt is a Data Manipulation Language (DML) command.
It deletes the entire structure of the table.It PRESERVES the structure of the table.It does not affect the structure of the table.


Discussion

No Comment Found