Can you tell me the difference between DELETE & TRUNCATE
commands?
Answers were Sorted based on User's Feedback
Answer / pankaj kumar upadhyay
1) When we use delete command that time we will use
conditon or without conditon but when we use truncate
command so that time we will not use condition.
2)delete can roll back but truncate is not rollback.
3)Truncate is faster compare delete command.
4)delete is DML command while Truncate is DDL.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / afzal_aziz
http://weblogs.sqlteam.com/mladenp/archive/2007/10/03/SQL-
Server-Why-is-TRUNCATE-TABLE-a-DDL-and-not.aspx
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / kapil
Delete: is a DML command.
Truncate: is a DDL command.
Delete & Truncate both can be rolled back.
Untill you have not commit transaction.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / amita
Delete command only delete the rows from the table but the
schema of the table yet remains.Whereas Truncate command
delete the rows along with the tale's schema from the
memory permanently.
| Is This Answer Correct ? | 3 Yes | 28 No |
Answer / saradhi
Truncate command result can be rolled back as it is not
made an entry in the log where as Delete command result
can't be rolled back
| Is This Answer Correct ? | 5 Yes | 47 No |
Is it possible we can connect our SQL database to GUI application? If it is yes than how tell me the explanation
i need some interview questions on sql server developer plz any onee send some links.
What is difference between stored procedure & function?
3 Answers CarrizalSoft Technologies, Concept Infoway, TATA,
How to override dml statements with triggers?
What is the difference between resultset and resultsetmetadata?
What is the difference between migration and upgradation in sql server?
What is index, cluster index and nonclustered index?
What do you mean by table and field in sql?
how to insert the values in 5 table at a time Using any single statement ?
6 Answers Infosys, Value Labs,
How to convert a table data in XML format in sql server?
how can i lock the column in the table
Explain external key management in sql server 2008
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)