Oracle table - August 11, 2008 at 15:00 PM by Amit
Satpute
Explain drop and truncate table command.
Answer
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.
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.
Answer
The desc table_name command is used to view the structure of the table
What are the limitation of alter command?
Answer
ALTER Command supports only the RENAME TABLE and ADD COLUMN variants.
Other kinds of ALTER TABLE operations such as DROP COLUMN, ALTER COLUMN, ADD
CONSTRAINT are omitted.
Oracle table - Nov 17, 2008 at 15:00 PM by Nishant Kumar
Explain Alter Table Command.
Answer - Alter Table command is a DDL command that is used to
change the definition of the table. Changing definition means changing
datatype, width of columns or adding a new column in the table.
What are the limitations of Alter Table command?
Answer - Column can’t be deleted with alter command.
Column can’t be renamed a column.
Column can’t be added in between of the existing columns.
When a column is added, it will be added at the end of the table.
|