What is the difference between DELETE, TRUNCATE, and DROP?

Answer Posted / glibwaresoftsolutions

• DELETE:
o Deletes specific rows from a table.
o Can have a WHERE clause.
o DML command (can be rolled back).
• TRUNCATE:
o Deletes all rows from a table.
o Faster than DELETE (does not log individual row deletions).
o DDL command (cannot be rolled back).
• DROP:
o Removes a table entirely (schema + data).
o DDL command.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to process query result in pl/sql?

840


Explain constraints in sql?

820


What is sql procedures and functions?

793


What are the sql commands?

855


What is anonymous block in sql?

892


what is single byte over head in oracle..?

2175


Are subqueries faster than joins?

764


What is the difference between between and in condition operators?

769


what is top in tsql? : Transact sql

803


How does index help in query performance?

809


What is difference between mysql and postgresql?

769


Can a table contain multiple foreign key’s?

786


How do you create a db file?

761


What is the order of sql select?

807


how to dump a table to a file with 'mysqldump'? : Sql dba

801