DELETE
- DELETE is a DML command
- DELETE command is use to remove rows from a table.
- COMMIT or ROLLBACK is necessary after performing DELETE operation commend because DELETE is a DML command.
- WHERE clause can be used in DELETE operation for removing some rows from a table.
- Only rows of table is remove not structured.
TRUNCATE
- TRUNCATE is a DDL command.
- TRUNCATE remove all rows from table,this is faster than DELETE.
- COMMIT or ROLLBACK is not use while performing TRUNCATE commend because DDL command.
DROP
- DROP is a DDL command.
- DROP remove table from the database (remove data & structure of table).
- COMMIT or ROLLBACK is not use
No comments:
Post a Comment