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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to read data in a table with "select" statements?

735


What is a field name?

709


Explain table valued parameters in sql server? Why tvp used?

730


Tell me the phases a transaction has to undergo?

715


What is an expensive query?

703






What are extended events in sql server?

670


How to create a simple user defined function in ms sql server?

743


What are the disadvantages of primary key and foreign key in SQL?

806


What is meant by datasource?

685


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

1477


What is the language structure to add a record to a table?

760


Types of Authentications in Sql Server? How user gets authenticated through windows authentication?

758


Explain what is the difference between union and union all?

744


Why the trigger fires multiple times in single login?

882


Explain datetime2 data type in sal server 2008?

707