what is the difference between delete,drop and truncate
Answers were Sorted based on User's Feedback
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 |
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 |
what is physical sort data and logical sort data in index?
How to read 2nd highest sal from EMP table?
Why does sql studio use a single registered database repository? : sql server management studio
CREATE a table from another table
How to name query output columns in ms sql server?
What are different types of data sources?
List the various tools available for performance tuning?
Why and when do stored procedure recompile?
What is the datatype returned by count(*)
22 Answers 247Customer, Asian CERC,
How can we remove orphan records from a table?
What’s the use of custom fields in report?
What is the recommended total size of your memory optimized tables?