What is difference between TRUNCATE and DELETE statement

Answer Posted / xyz

truncate basically clears the data from the rows of a
specified colomn.
e.g. truncate colomn_name from table_name
then this will only empty the colomn

delete is used to simpy delete anything from the table.
e.g. delete table_name
this will remove the whole table from the database.

Is This Answer Correct ?    9 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain an automatic checkpoint

724


What does this statement do @@rowcount?

741


Are there issues when exporting SSRS reports into Microsoft Excel? When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?

161


Can I run multiple instances of sql server 2000 at the same time on one computer?

811


Explain how does the report manager work in ssrs?

710


What is the difference between push and pull subscription? : sql server replication

861


What are types of storage modes? : sql server analysis services, ssas

780


Do you have any idea about the tcl commands?

725


Explain how to maintain a fill factor in existing indexes?

731


Different types of keys in SQL?

827


What should be the fill factor for indexes created on tables? : sql server database administration

830


What are the character string functions supported by sql server 2005?

708


what are different types of raid configurations? : Sql server database administration

710


What are the restrictions while creating batches in sql server?

766


What is replace and stuff function in sql server?

742