What is the difference between truncate and delete statement?

Answer Posted / sreejith s t

Both Truncate and delete deletes the rows from a table .
But we cant use where clause in truncate statement . While
doing delete operation all the deleted rows are logged in
the transaction log . It reduces the perfomance . In
truncate operation no transaction logging is happening .
Delete is Autocommited but Truncate is Not .

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if null values are involved in bitwise operations?

605


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

542


What is checkpoint in sql server?

618


Do you know what is bit data type and whats the information that can be stored inside a bit column?

558


What stored by the model?

552






Does union all remove duplicates?

609


Are all views updatable ?

726


how many type of indexing in database?

581


How do you send email on SQL Server?

584


Is it possible in sql table to have more than one foreign key?

612


Where cross join is used?

519


What are clustered and non-clustered index?

548


What is normalization? What number of normalization shapes are there?

605


What is join query?

499


Differentiate between a primary key and a unique key.

599