Can you tell me the difference between DELETE & TRUNCATE
commands?

Answer Posted / rahul goel

There are many differences. Some of these are as follows:
1. Delete can be rollback but Turncate can not be rollback.
2. Delete is a DML command and Turncate is a DDL command.
3. Delete command is used for deleting one or more row from
the table whereas Turncate command is used for deleting all
rows from the table.
4. Turncate is fact as compared to delete command.
5. we can use where clause with Delete but where is not
possible with Turncate.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between delete and truncate commands?

693


What is the difference between stored procedure and user defined functions?

846


How to find Duplicate Records In table?

756


What is the sql case statement used for?

755


What is the name of the system variable that returns the number of rows affected by a SQL statement?

766






Can binary strings be used in arithmetical operations?

680


What causes index fragmentation?

744


Explain filestream storage of sql server 2008?

692


How do I completely remove sql server instance?

776


what are the important architecture components of SSRS?

112


How is table type constraint applied to a table?

727


Do you know how to make remote connection in database?

709


What is an index in sql?

725


what is the primary use of the model database? : Sql server administration

721


How do I change my passwords (database, LDAP, and so on) without causing an outage?

779