Tell us what is the difference between Delete, Truncate and Drop command?
Submitted by: MuhammadThe difference between the Delete, Truncate and Drop command is
☛ Delete command is a DML command, it is used to delete rows from a table. It can be rolled back.
☛ Truncate is a DDL command, it is used to delete all the rows from the table and free the space containing the table. It cant be rolled back.
☛ Drop is a DDL command, it removes the complete data along with the table structure(unlike truncate command that removes only the rows). All the tables' rows, indexes, and privileges will also be removed.
Submitted by: Muhammad
☛ Delete command is a DML command, it is used to delete rows from a table. It can be rolled back.
☛ Truncate is a DDL command, it is used to delete all the rows from the table and free the space containing the table. It cant be rolled back.
☛ Drop is a DDL command, it removes the complete data along with the table structure(unlike truncate command that removes only the rows). All the tables' rows, indexes, and privileges will also be removed.
Submitted by: Muhammad
Read Online Database Developer Job Interview Questions And Answers
Top Database Developer Questions
☺ | Please explain what is Database Testing? |
☺ | Explain me what are the different DDL commands in SQL? |
☺ | Tell us what is a temp table? |
☺ | Tell me what is a Composite PRIMARY KEY? |
☺ | Do you know SQL Data Types? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |