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

What is trigger and stored procedure in sql?

975


Is primary key a clustered index?

909


What is meant by user defined function?

976


Where not exists in sql?

904


How many indexes can be created on a table in sql?

983


Can we use view in stored procedure?

862


What is prepared statement in sql?

992


What are the set operators in sql?

1027


What are system versioned tables?

963


how many triggers are allowed in mysql table? : Sql dba

994


Do we need to rebuild index after truncate?

972


Explain autonomous transaction.

1091


What is multiple partition?

918


Explain the steps needed to create the scheduled job?

965


what is innodb? : Sql dba

1029