Difference between Delete & Drop & Truncate command
Delete command : remove only the data from the table but keep the table structure .
Syntax :
delete from table_name;
Truncate command :remove only the data from the table but keep the table structure .
Syntax :
Truncate table table_name;
but the difference between delete and truncate command
The truncate command is DDL statement so this command will auto commit .
but the delete command is DML statement so this command can be rollback .
Drop command : remove data and the table structure .
Syntax:
drop table table_name;
Delete command : remove only the data from the table but keep the table structure .
Syntax :
delete from table_name;
Truncate command :remove only the data from the table but keep the table structure .
Syntax :
Truncate table table_name;
but the difference between delete and truncate command
The truncate command is DDL statement so this command will auto commit .
but the delete command is DML statement so this command can be rollback .
Drop command : remove data and the table structure .
Syntax:
drop table table_name;
***********************
***********************