difference between truncate and delete ,drop?

Answer Posted / ashu singh

Drop deletes the table along with its structure from the database.
Delete command deletes the records from the table and it also deletes the table space allocated in the database.

Truncate is similar to Delete but it does not delete the table space from the database.

Drop and Truncate are the DDL command hence can't be rolled back whereas Delete is a DML command and can be rolled back.

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to insert comments into sql statements return in the data model editor ?

2072


Can a parameter be passed to a cursor?

601


How to loop through data rows in the implicit cursor?

545


Explain how are indexes update?

623


how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?

1831






When do I need to use a semicolon vs a slash in oracle sql?

594


What is the difference between truncate & delete command?

620


What is the difference between translate and replace?

565


How to convert characters to dates in oracle?

563


what is the difference between data migration and production migration.

1813


What is SQL Tuning Advisor in Oracle?

635


How to delete a column in an existing table?

596


What is the difference between sharding and replication?

480


What is an oracle user account?

585


What is a dead lock in oracle?

599