Explain drop and truncate table command

Explain drop and truncate table command.

TRUNCATE:
TRUNCATE removes all rows from a table.
The operation cannot be rolled back and no triggers will be fired.

The following example will show what a TRUNCATE does:
SQL> TRUNCATE TABLE emp;

Table truncated.

DROP:
The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.

The following example will show what a DROP does:
SQL> DROP TABLE emp;

Table dropped
Write the command to view the structure of the table
The desc table_name command is used to view the structure of the table....
What are the limitation of alter command?
ALTER Command supports only the RENAME TABLE and ADD COLUMN variants...
Explain Alter Table Command
Alter Table command is a DDL command that is used to change the definition of the table....
Post your comment