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 are the differences between drop a table and truncate
a table?

Answer Posted / soumik

1.DELETE table will result into deletion of data from the
table without affecting the table structure. But since
delete statement is a DML(Data Manipulation Language)
statement, it directly dosnt reflect the database. In other
words, the deleted data will be stored in a separate
tablespace called UNDO tablespace(which takes up memory)
that can be retrieved by using a ROLLBACK statement.

2. DROP table results into loss of data and structure both
which cannot be retrieved. Drop statement is DDL(Data
Definition Language) which is AUTO-COMMIT.

3. TRUNCATE table will clear the data from the table only
without affecting the table structure. Data cannot be
retrieved after executing this statement as well, since it
an AUTO-COMMIT statement. Truncate is also a DDL statement.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to enable or disable a row of a table using MySQL in struts?

4034


How to upload a large file through phpmyadmin in mysql?

862


In a property booking section want a query to check that property is booked from StartDate to EndDate.Booking Table field are given id proerty_id start_date checkout_date no_of_visitor booking date status Waiting yours answer.. Thanks In Advance...

3116


What is ibdata1?

842


What does innodb stand for?

924


What are features of mysql?

839


Does mysql need a server?

855


suppose data is copie to oracle to sql by using DTS. Actully it taken 2 hours. suppose some day distribute the server in the middle of 2 hours. after how can i get the data ?

2072


What is ndb in mysql?

902


What are the other commands to know the structure of a table using mysql commands except explain command?

958


Explain the difference between mysql_fetch_array(), mysql_fetch_object()?

866


What is the default password for mysql?

844


How many sql ddl commands are supported by 'mysql'?

1073


How to get current MySQL version?

1023


What is a data directory?

874