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 difference between TRUNCATE & DELETE?

Answer Posted / oracle_tigress

difference between truncate and delete

1.truncate removes rows in one execution..delete removes
rows one by one so truncate is fast..

2.truncate does not creates logs and hence canot be
rolledback and hence is a DDL stmt..DELETE creates rollback
segment hence can be rolled back and hence is a DML stmt.

3.truncate doesnot allow for conditional remove of records
(all records has to remove) DELETE allows conditonal remove
of records(where cluase etc can be used.)

4.triggers are not fired on truncate stmt but trgieers are
fired on DELETE stmt..

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the working of primary key?

1098


What is dense_rank?

935


How to avoid duplicate records in a query?

1008


what are the 'mysql' command line arguments? : Sql dba

1138


Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql

990


How many sql statements are used?

1010


What are the steps for performance tuning.

1338


What are the types of views in sql?

1103


How do you break a loop in pl sql?

1050


What are the sql versions?

951


Why select is used in sql?

1020


How do you delete duplicates in sql query using rowid?

947


Explain table and field in sql?

1062


What do you mean by “trigger” in sql?

1080


What is the purpose of the sql select top clause?

1112