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

What does trigger mean in slang?

519


Where are my tempfiles, I don't see them in v$datafile or dba_data_file?

542


Enlist some predefined exceptions?

575


What is the life of an sql statement?

519


What are the advantages of indexing?

513






What is an invalid partition table?

556


How do I view output in sql developer?

567


What is trigger in sql? Explain

530


What are the properties of a transaction?

550


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

605


Can we create index on primary key?

519


Which are the different types of indexes in sql?

549


what are the different type of normalization? : Sql dba

548


How to read/write files from pl/sql?

576


what is the difference between inner and outer join? Explain with example. : Sql dba

542