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 a sub-report?

115


How can you stop stored procedures from recompiling?

676


Is it possible to update the views? If yes, how, if not, why?

748


What is table constraint?

761


How to use old values to define new values in update statements in ms sql server?

927


What is the difference between char and varchar2 datatype in sql?

790


What is the difference between rank and dense_rank?

726


Explain indexed views?

768


How to reaname table name without using sp_Rename in sql server..?

773


What is dirty read?

847


What stored by the msdb? : sql server database administration

789


Can I work with several databases simultaneously? : sql server management studio

781


What is exporting and importing utility?

814


Does transparent data encryption provide encryption when transmitting data across the network?

837


What is a trace frag? Where do we use it?

870