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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is set serveroutput on in pl sql?

876


what is acid property in database? : Sql dba

772


How to connect a sql*plus session to an oracle server?

867


What is the difference between delete, truncate and drop command?

786


What is the difference between a primary key and a unique key?

785


What is the difference between drop and truncate commands?

753


What is cursor and why it is required?

845


how are mysql timestamps seen to a user? : Sql dba

809


What are the different type of joins in sql?

753


What is the difference between cross join and natural join?

792


How do I get sql certification?

736


What is the difference between left join and right join?

706


what are the authentication modes in sql server? How can it be changed? : Sql dba

996


What are sql queries used for?

797


How many rows can sqlite handle?

816