What is Difference Between delete and Truncate?

Answer Posted / rajesh

Delete is DML statement which can delete data from table
which needs to be commited afterwards. But it doesn't free
memory area occupied by the data in the table.Where clause
can be used.

Truncate is DDL statement which is auto commit. It not only
deletes all data from table, but it also frees the memory
area occupied the data in the table. where clause is not
permitted. Works faster than delete statement

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a function retun more than one value in oracle with proper example?

594


How many functions are there in sql?

552


What is cte sql?

525


What are the sql versions?

526


Is join same as left join?

539






Is postgresql a server?

581


What are the types of keys?

518


Which version of sql do I have?

573


define sql insert statement ? : Sql dba

561


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

572


What does bitemporal mean?

605


What is java sql drivermanager?

556


write an sql query to find names of employee start with 'a'? : Sql dba

590


What are different functions in sql?

523


Why query optimization is needed?

527