Wednesday, April 27, 2011

DELETE & TRUNCATE differences

.
                    DELETE
         TRUNCATE
DML  command

NOT Auto-commit

We can ROLLBACK

WHERE clause Supported

It will fire TRIGGERS

SLOWER

Does not reset HIGH WATER MARK

can delete SELECTIVE ROWS from table using where clause

Delete will generate REDO LOG entries
 DDL command

Auto-commit

We cannot ROLLBACK

WHERE clause NOT Supported

It will NOT fire TRIGGERS

FASTER

RESETS HIGH WATER MARK




CANNOT be used for selective rows


Truncate DOES NOT Generate Redo log entries

0 comments:

Post a Comment

Auto Scroll Stop Scroll