what is exact difference between drop and truncate table.
Answer Posted / chandana
Drop :
1.Deletes the entire table records as well as the table
structure.
2.It is a DDL Command.
3. Logs are not maintained.
4. Auto Commited.
5.Where clause cannot be used in the Drop statement.Synatx:
Drop table <Table_Name>
Trunctae:
1. Deletes the entire table records ,retains the table
structure.
2. Its a DDL Command.
3. Logs are not maintained. So faster in performace than
Delete.
4. Auto Commited.
Cannot be Rolled Back.
5.Where clause cannot be used with truncate statement.
Truncate Table <Table_Name>;
Delete:
1. Deletes the table records based on condtions ,retains
the table structure.
2. Its a DML Command.
3. Logs are maintained.So slower than trucate.
4. No Auto Commited.So can be Rolled Back.
5.Where clause can be used with truncate statement.
Syantx:
Delete from <Table_Name> where <Condition>;
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is oracle join syntax?
Can the query output be sorted by multiple columns in oracle?
How to apply filtering criteria at group level in oracle?
What is hot backup and logical backup?
how to convert .db (extention) database file into .dmp (extention ) for oracle database ?
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
How to define a specific record type?
What is the difference between formal parameters and actual parameters?
What is the use of oracle?
How would you begin to troubleshoot an ORA-3113 error?
What are the general rules on data consistency?
What is different types of joins?
How to do clean up if create database failed?
How do I manually uninstall oracle client?
What is an oracle database?