Most Common question in Interview purpose -
Difference
Similarity
1. These both command will only used for delete data of the specified table.Difference
1. TRUNCATE
is a DDL (data definition language) command whereas DELETE is a DML (data
manipulation language) command.
2. We
can’t execute a trigger in case of TRUNCATE whereas with DELETE command, we can
execute a trigger.
3. We
can apply condition on DELETE whereas can’t apply on TRUNCATE.
4. TRUNCATE
remove the reference like Identity whereas DELETE isn’t.
5. DELETE Stmt delete record one by one whereas TRUNCATE remove all recods in one attempt.
No comments:
Post a Comment
Thank You !!!!