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
I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.
how to clone 9i Database on to 10g Database.
What is max rowid in oracle?
1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.
When do we use group by clause in a sql query?
How to display row numbers with the records?
What is oracle sid?
What is an oracle data file?
What do you know about normalization? Explain in detail?
Explain the use of file option in exp command.
How to get a list of all background sessions in the database?
What are the logical operations?
How to update values on multiple rows in oracle?
15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.
How can we find out the duplicate values in an oracle table?