what is the difference between TRUNCATE and DELETE command
in SQL
Answer Posted / raja lakshmi reddy v
hi friends this is raja
Truncate:
1. Truncate is used to delete all rows at a time, so the
table will become as free. The user feel the table does not
contain any rows, eventhough but internally the data exist
some memory that memory is free for our reuse.
2. Truncate is faster than delete, and where clause never
possible.
3. It is ddl command so that it will not roll back because
auto commit by default.
4. in sqlserver autoid columns will reset since from
starting seed value.
Delete:
1. Delete is used to Delete particular rows or all with
where clause or without where clause.
2. remeber if u delete rows, eventhough that memory will
never free means separate memory will allocate to our table.
3. It is slower than the truncate.
4. in sqlserver autoid values will never start from seed
intial value or default value.
5. while deleting check constrains, if any problem errow
thrown.
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
WHAT ARE TEMPLATES?EXPLAIN WHAT YOU HAVE CREATED?
Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also
which one is currently in used software cmpanies.
Is there any link between pr form(purchse requisition)and po form(purchase order)
Hey i want to join oracle apps so will you pls tell me that which institute is best in hyderabad.
i am pursuing mca and i want to do oracle apps technical in hydrabad, plz guide me tne best institue in hydrabad those have excellent knowledge in oracle apps.
What do you mean by hz_ in customer tables? : oracle accounts receivable
What is chargeback invoice? How do we create it? : oracle accounts receivable
What are the advantages of operating a database in ARCHIVELOG mode over operating it in NO ARCHIVELOG mode in Oracle?
What do you mean by Oracle MEDIA RECOVERY?
difference of using cursor for loop and open,fetch,close.which one is better
What Are Cross Validation & Adi?
What is auto accounting what are the steps for setting up auto accounting? : oracle accounts receivable
Could you please let me know the interfaces in OM / FA??
while creating requisitions i am unable to see the list of organisation can anyone help me out ?