Wednesday, January 6, 2010

Altering column in a table

Syntax:
alter table table_name alter column column_name datatype(size),..n;

Here we alter datatype and size of the columns.

Example:
Alter table quest ALTER COLUMN quest_name char(100);

In this i have created a table named 'quest' with column as 'quest_name char(30)', so am in the situation to enter question name more than 30 characters so i change the size to 100.

No comments:

Post a Comment