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 are functions in sql?

0 Answers  


how to load data with out header and footer records in a database using sql*loader? pls tell me the answer urgently

1 Answers   Oracle, Wipro,


how to convert dates to character strings? : Sql dba

0 Answers  


how tsql statements can be written and submitted to the database engine? : Transact sql

0 Answers  


What language is oracle sql developer?

0 Answers  


what is difference between pass by value and eference by value in oracle plsql

1 Answers  


What are crud methods?

0 Answers  


How many types of relationship are there?

0 Answers  


What does fetching a cursor do?

0 Answers  


Can you create a table with Primary Key not as the clustered index.

2 Answers   CGI,


How to add, remove, modify users using sql?

0 Answers  


What is group function in sql?

0 Answers  


Categories