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 data manipulation language?

924


What are the sql versions?

721


What is loop in pl sql?

806


What are three advantages to using sql?

779


What is primary and foreign key?

861


- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?

1625


How do I order by ascending in sql?

792


What are the uses of sysdate and user keywords?

893


What are the two types of exceptions.

882


How many types of relationship are there?

799


Can triggers stop a dml statement from executing on a table?

850


How do I truncate a sql log file?

804


Explain the purpose of %type and %rowtype data types with the example?

781


how to convert character strings to dates? : Sql dba

771


Explain about various levels of constraint.

746