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

Answer Posted / anil

Delete Commands:

it is dml statement
you can specify delete command with critery (where
condition)

syntax: Delete * from tablename where condition

Truncate Command:

it is DDL statement
you can not specify critery with truncate table

syntax: truncate table tablename

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is SQL Azure?

85


Explain where clause?

537


What is database isolation in sql server? : sql server database administration

570


What do you mean by stored techniques? How would we use it?

587


What are the types of lock supported by ?

614






Other than truncate statement, which other command can by-pass the trigger on the tables?

624


How to stop log file growing too big?

577


How will you find out if there are expensive SQL statements running or not?

585


What is raid and what are different types of raid levels?

596


What is dbcc? Give few examples.

582


What is sql server profiler?

574


What security features are available for stored procedure?

591


How would we use distinct statement? What is its use?

609


What is xml datatype?

660


How does clustered and non clustered index work?

520