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

Answers were Sorted based on User's Feedback



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

Answer / nashiinformaticssolutions

• 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

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

Answer / 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

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

Answer / hr@tgksolutions.com

• 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

More SQL PLSQL Interview Questions

What is sequence in sql?

0 Answers  


What are the different types of a subquery?

0 Answers  


Can there be more than one function with a similar name in a pl/sql block?

0 Answers  


what is the difference between binary_integer and pls_integer

2 Answers   TCS,


Why do we use function in pl sql?

0 Answers  






what is meant by tuning and tk proof?

2 Answers  


what is myisam? : Sql dba

0 Answers  


What is a trigger ?

11 Answers   Accenture, BirlaSoft,


How can I change database name in sql?

0 Answers  


What is the difference between row level and statement level trigger?

0 Answers  


Which is faster count (*) or count 1?

0 Answers  


What is function and procedure?

0 Answers  


Categories