1.

Explain the difference between DROP and TRUNCATE commands in SQL?

Answer»

TRUNCATE

  • It removes all rows from a table.
  • It does not require a WHERE clause.
  • Truncate cannot be used with indexed views.
  • It is performance WISE faster.
DROP
  • It removes a table from the database.
  • All table's rows, indexes, and privileges will also be removed when we used this command.
  • The OPERATION cannot be rolled BACK.

 

You can download here sql INTERVIEW questions pdf after registeration or subscribe.

 



Discussion

No Comment Found