Drop:
- Drop is DDL operation.
- IN drop, a table delete all data and table itself.
- we can not use rollback and commit.
Delete vs Truncate:
- Delete is DML operation while truncate is DDL operation.
- IN delete, we can use where condition but not in truncate. truncate delete all rows.
- Delete is slower than truncate.
- In delete, we can rollback but not in truncate because in delete, data is not permanent delete but in truncate, data is permanent deleted.
- In delete we need to use commit for permanent delete.
- When we do delete then it make a table for rollback.
No comments:
Post a Comment