Onkar Sharma
Difference between Delete, Truncate and Drop Statements in SQL Server?

Difference between Delete, Truncate and Drop Statements in SQL Server?

By Onkar Sharma in SQL Server on Jul 03 2021
  • Ganesan C
    Aug, 2021 7

    Delete : Just delete the all or particular record (row) from the table. Truncate : Delete the all records(rows) in the table. But structure of the table remains exists. If you truncate the tble tjen you cm add the records to the table. Drop: Delete the table records as well as table structure. If you dropped the table then you cannot add any record to the table.

    • 2
  • Shubham Shukla
    Jul, 2021 5

    Drop command removes a table from the database. Truncate Remove all rows from a table, without logging the individual row deletions. In truncate data page is locked before removing it. Truncate and drop both are DDL Commands. In truncate you can not delete specified rows. It is faster than delete. Delete command is used to delete specified rows (one or more). In delete tuple is locked before removing it. You can specified rows using Where Clause. Delete command is DML.

    • 2
  • Onkar Sharma
    Jul, 2021 31
  • Onkar Sharma
    Jul, 2021 31


Most Popular Job Functions


MOST LIKED QUESTIONS