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 the diff between Truncate table / delete <table
name> purge

Answer Posted / d.elumalai

DELETE:

1.DML Command.
2. Can be used with WHERE clause.
3. Can be rolled back.
4. Deletes table contents row by row when executed.
5. Delete is slow
6.Doesn't frees-up the Storage Space
7.Creates the log file
8.Returns the no. of rows deleted when queried.
9. Trigger gets fired incase of Delete.
10. Date gets copied into the Rollback tablespace after
Delete is executed.

TRUNCATE:

1.A DDL Command,
2.Can't be used with WHERE clause.
3.Can't be Rolled back.
4.Drops the entire table contents when executed but not the
table. [Note:DROP commnad deletes the entire contents along
with the table]
5.Truncate is faster.
6.Frees-up the Stroage Space
7. Doesn't create a log file
8.Doesn't return the no. of rows deleted when queried.
9.Trigger doesn't get fired incase of Truncate.
10.Data gets romoved directly without copying it into the
Rollback tablespace when truncate is executed.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to check myisam tables for errors? : Sql dba

1389


How do you bind variables in pl sql?

1156


What is parameter substitution in sql?

1079


how to check server status with 'mysqladmin'? : Sql dba

1131


what are the system privileges that are required by a schema owner (user) to create a trigger on a table?

1119


What are the query optimization techniques?

995


What is the main difference between sql and pl/sql?

1146


Why triggers are used?

1036


What are all types of user defined functions?

1131


What is the usage of sql functions?

1199


Can we create index on primary key?

1018


what is the use of double ampersand (&&) in sql queries?

1226


what is data control language? : Sql dba

1065


What is count * in sql?

1040


Can there be 2 primary keys in a table?

1041