What is the difference between DELETE, TRUNCATE, and DROP?
Answers were Sorted based on User's Feedback
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 |
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 |
• 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 sequence in sql?
What are the different types of a subquery?
Can there be more than one function with a similar name in a pl/sql block?
what is the difference between binary_integer and pls_integer
Why do we use function in pl sql?
what is meant by tuning and tk proof?
what is myisam? : Sql dba
What is a trigger ?
11 Answers Accenture, BirlaSoft,
How can I change database name in sql?
What is the difference between row level and statement level trigger?
Which is faster count (*) or count 1?
What is function and procedure?