What is the difference between truncate and delete statement?

Answers were Sorted based on User's Feedback



What is the difference between truncate and delete statement?..

Answer / valarmathi

truncate delete all records from the table and it is auto
commit. We can't able to rollback the data after performing
truncate operation.

delete statement delete the specific or all records from
the table. But we can able to rollback the deleted record

Is This Answer Correct ?    8 Yes 1 No

What is the difference between truncate and delete statement?..

Answer / rajiv singh

Truncate deletes all rows from table. But Delete deletes
row/rows by condition.

Is This Answer Correct ?    5 Yes 0 No

What is the difference between truncate and delete statement?..

Answer / sreejith s t

Both Truncate and delete deletes the rows from a table .
But we cant use where clause in truncate statement . While
doing delete operation all the deleted rows are logged in
the transaction log . It reduces the perfomance . In
truncate operation no transaction logging is happening .
Delete is Autocommited but Truncate is Not .

Is This Answer Correct ?    6 Yes 2 No

What is the difference between truncate and delete statement?..

Answer / ismail hasan

truncate deletes records from a table and while truncating a
table, the table will be dropped from the database and will
again be created automatically. No where clause is
acceptable in truncate statement and one can't restore the
previous data (i.e no rollback is possible) into the table.
It's an efficient process.

Delete statement will delete a particular row(s) on your
choice.

Is This Answer Correct ?    3 Yes 1 No

What is the difference between truncate and delete statement?..

Answer / vasu

Both Truncate and delete deletes the rows from a table .
But we cant use where clause in truncate statement . While
doing delete operation all the deleted rows are logged in
the transaction log . It reduces the perfomance . In
truncate operation no transaction logging is happening .
Delete is Autocommited but Truncate is Not .

Is This Answer Correct ?    1 Yes 0 No

What is the difference between truncate and delete statement?..

Answer / balaji t

Identity counter can be reset in truncate whereas it is not possible in delete.Truncate dont activate trigger whereas delete can be used in triggers.truncate is a DDL command whereas delete is a DML command.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How to generate create table script on an existing table in ms sql server?

0 Answers  


What is a join and their types?

2 Answers   Challenger Financial,


Detail about query optimizer?

0 Answers  


Table - Products has number of products as below Productid ProductName 1 iPhone 2 iPad 3 BlackBerry Table - SalesPersonProduct has the below records Salespersonid productid S1 1 S1 2 S1 3 S2 1 S3 2 Write a SQL query that returns the number of sales for each product

2 Answers  


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

0 Answers   ABC,






What are the advantages of having an index on the sql server?

0 Answers  


What is the difference between executequery () and executeupdate ()?

0 Answers  


write coding for importing sql data into a word excel...

1 Answers   Oracle,


Explain what are the authentication modes in sql server?

0 Answers  


What are various ways to enhance the ssrs report?

0 Answers  


Explain what are sparse columns?

0 Answers  


List all types of constraints in sql server?

0 Answers  


Categories