Compare and contrast TRUNCATE and DELETE for a table.
Can someone Compare and contrast TRUNCATE and DELETE for a table like what is the difference between them ?
Posted Answers
truncate and delete command have the most wanted result of getting purge of all the rows in a table. The distinction among the twois that the truncate is a DDL procedure and it delete data without producing a rollback. While we have chance of recovery if data deleted accidently by using delete command, as it is a DML Operation and it produces roolback.
Answer by: Anonymous
Since Truncate command(DDL) internally produces a commit so the deletion of rows are confimed in the database table so it can not be rolled back.but delete command(DDL) will just manupulate the table rows which is not permenantly done in actual database until a commit statement. so we can rollback the delete statement.
Answer by: Anonymous
