what is the difference between delete,drop and truncate

Answers were Sorted based on User's Feedback



what is the difference between delete,drop and truncate..

Answer / mohammadali.info

*The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation you need to
COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.

*TRUNCATE removes all rows from a table. The operation cannot be rolled back. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.

*The DROP command removes a table from the database. All the tables' rows,
indexes and privileges will also be removed. The operation cannot be rolled back.

*DROP and TRUNCATE are DDL commands, whereas DELETE is a DML command. Therefore DELETE operations can be rolled back (undone), while DROP and TRUNCATE operations cannot be rolled back.

IF Answer is Correct Pls give Rate

Is This Answer Correct ?    46 Yes 0 No

what is the difference between delete,drop and truncate..

Answer / krishna

DELETE,DROP,TRUNCTATE are to use the remove the rows from the table

DELETE: Delete is used to delete the rows from table by using where condition also and we can ROLLBACK it also

DROP: Delete rows permanently and we can not ROLLBACK it.

TRUNCATE : Delete the data not the structure means in this delete only data but structure is same

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL Server Interview Questions

what is physical sort data and logical sort data in index?

2 Answers  


How to read 2nd highest sal from EMP table?

5 Answers   IBM, TCS,


Why does sql studio use a single registered database repository? : sql server management studio

0 Answers  


CREATE a table from another table

2 Answers  


How to name query output columns in ms sql server?

0 Answers  






What are different types of data sources?

0 Answers  


List the various tools available for performance tuning?

0 Answers  


Why and when do stored procedure recompile?

0 Answers  


What is the datatype returned by count(*)

22 Answers   247Customer, Asian CERC,


How can we remove orphan records from a table?

0 Answers  


What’s the use of custom fields in report?

0 Answers  


What is the recommended total size of your memory optimized tables?

0 Answers  


Categories