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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When sql appeared?

838


How do you write a subquery?

726


Is join same as left join?

782


What is delimiter in pl sql?

783


What is the difference between inner join and natural join?

756


What is numeric function sql?

748


What is trigger explain it?

769


what are enums used for in mysql? : Sql dba

860


How do you drop a trigger?

747


What are sql procedures?

789


Why we use pl sql?

739


In what condition is it good to disable a trigger?

786


What is latest version of sql?

763


what is a composite key ? : Sql dba

828


What is where clause in sql?

777