The SQL truncate command is used for delete all the data from an existing table. TRUNCATE table is similar to DELETE command in sql with no where clause.
TRUNCATE TABLE table_name
Here is an Example explaining it.
truncate table Employee;
The above query will delete all the records of Employee table.
The SQL DROP command is used for completely removes a table from database. This command also destroy the table struncture also. It is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table.
drop table table_name
Here is an Example explaining it.
drop table Employee;
The above query will delete the Employee table completely.
The DROP command can also be used on Databases.
drop database database_name;
Here is an Example explaining it.
drop database Organization;
The above query will drop a database named Organization from the system.
rename command is used to rename a table.
rename table old-table-name to new-table-name
old-table-name:Specifies the name of the table to be renamed.
new-table-name:Specifies the new name of the table.
Here is an Example explaining it.
rename table Employee to Employee_details;
The above query will rename Employee table to Employee_details.