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 bind variable in oracle 11g?
How to create a table interactively?
How to invoke the data pump import utility?
how may join possible between (requisition with purchase order)
How to change user password in oracle?
How to upsert (update or insert into a table)?
How do I connect to oracle database?
What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?
How to get a list of all user accounts in the database?
How do I know if oracle is installed on windows?
What is the difference between PFILE and SPFILE in Oracle?
How many memory layers are in the oracle shared pool?
How to rename an index?
What are the tools for Oracle ?
What is key preserved table?