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 is cte sql?

513


Are sql database names case sensitive?

495


What's the difference between a primary key and a clustered index?

510


What is the difference between alter trigger and drop trigger statements?

599


What do you mean by dbms? What are its different types?

552






How do I find duplicates in two columns?

547


What is left join in postgresql?

531


Is sql port 1433 encrypted?

570


Write an sql query to select all records from the table?

552


What is rtm in testing?

570


What is sql indexing?

546


What does select count (*) mean in sql?

542


What is sqlcommand?

546


What is a recursive stored procedure?

612


define join and explain different type of joins? : Sql dba

542