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 delete and truncet ?

Answer Posted / nitin bisht

Delete : A delete statement deletes the data from a table. A
delete statement can have a where clause, on which it
deletes the records that satisfy only the “where” condition.
If the
“where” condition is omitted the delete statement deletes
all the records in a table.

Actions of Delete statement :

* deletes the data from the current table space
* Modifies the undo tablespace with the delete records.
* Executes all the before / after statement and row
level triggers.
* Updates the indexes (makes the index empty if the
where clause is omitted).
* Constraint checks are performed before deleting the rows

.

Syntax of a delete Statement:

DELETE FROM table [WHERE condition]

Truncate : Truncate drops all the records in a table . But
as it is a DDL statement data cannot be retrieved. Usually
truncate is faster than delete statement becuase there is no
need to change or update the UNDO tablespace with the
deleted records. Truncate is an implict commit
Statement.Truncate statement deallocates the space.

Actions of Truncate Statement:Removes all the records from
the current tablespace.

* Updates the indexes.
* High watermark of the truncated table is reset.
* Integrity Constraint checks are performed

Syntax of a Truncate Statement:

TRUNCATE TABLE table_NAME ;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between database and server?

1022


There are three servers are run by Oracle, MS Access and .Net. What are the procedure fetching the values of two variables from two servers among these?

2163


Explain entity ?

1033


What does new grouping sets enables you to do?

1040


Which is the most reliable programming language for RDBMS Relational Database Management System for Multi user applicaton. For PC application or web application ?

2510


What is ole db ado?

984


What are different types of clusters present?

1079


WHAT IS NEED BY METION DATFMT AND TIMFMT IN H-SEPICITION IN RPGLE?

2971


What do you mean by foreign key and primary key?

1043


During insert operation in Netezza Connector, if we give direct option as Yes , is there any issue?

1382


Can you tell any two advantages of stored procedures?

1058


What do you mean by cluster and non cluster index?

1079


can i use the commands "modify" and Change in DB2 to alter my column datatype and its name in a table?

2112


What are the most common databases?

971


Can a database table exist without a primary key?

952