1.

What are the different modifications that can be made on the structure of a table? Which is the SQL corn mand required for this? Specify the clauses needs for each type of modification.

Answer»

Alter table command is used to modify existing column or add new column to an existing table.

There are 2 keywords used ADD and MODIFY.

We can alter the table in two ways.

We can add a new column to the existing table using the following syntax,

ALTER TABLE

<tablename>ADD(<cloumnname><type><constraint>);

We can also cha rige or modify the existing column in terms of type or size using the following syntax,

ALTER TABLE<tablename>MODIFY(<column><newtype>);



Discussion

No Comment Found