Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to create an oracle database manually?

1057


Is a rollback possible to any savepoint?

1069


Can we insert data in view oracle?

996


What is the difference between count (*), count (expression), count (distinct expression)?

988


how do u setup a replication site?

1962


Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

986


Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.

2089


In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?

2316


Explain a synonym?

1007


How to create a table index in oracle?

1112


What is a trace file and how is it created in oracle?

1025


What is the parameter mode that can be passed to a procedure?

1020


What is tns entry?

1110


How do you get nicely formatted results from an oracle procedure that returns a reference cursor?

1055


How to resolve the ORA-39133 error in Oracle?

1092