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
How to clone the database using RMAN back
what are the API of GL,PO,AP
HOW TO SAVE UNIVERSES AND DOCUMENTS IN THE REPOSITORY?
What is auto accounting what are the steps for setting up auto accounting? : oracle accounts receivable
What is the technical flow associated with P2P or Procure to Pay cycle like the tables, APIs, concurrent programs involved in this cycle. Only technical please.
Explain about party and customer in ar : oracle accounts receivable
How to move the data from one flatfile to multiple staging tables?give me some examples? for example in po interface one flat file is there and multiple staging tables are there how can move it?please give me answer for this question?
I am Bsc Computer Science Graduate, I have good knowledge in SQL 7.0, Can I go for Oracle APPS course please suggest me the answer
8. Supporting AP, AR and GL?
Are These Dff's Flexible?
What are the standard concurent programs for auto invoice interface and customer interfaces? : oracle accounts receivable
What is an Oracle database Full Backup?
what are the types of LIST REPORTS in cognos8BI? and what is the mean and use of METRIC STUDIO in Cognos 8.3BI?
Explain prerequisites and post activities of oracle database installation
What do you mean by hz_ in customer tables? : oracle accounts receivable