alter table my_table add column my_colunm varchar(eg) default "default";
actually ur this sql query only insert a new column at the end of the table
what i want is to insert a new column at the beginning of the table.
And, i just found out that there is no problem with the keyword "FIRST" at all. I read the manual wrongly yesterday.
======================
ALTER [IGNORE] TABLE tbl_name alter_specification [, alter_specification] ...
alter_specification:
ADD [COLUMN] column_definition [FIRST | AFTER col_name ]
....
.....
=======================
So, to add a column at the beginning of the table, use "alter table my_table add column my_colunm column_definition FIRST". To add a column at any other place rather than the beginning of the table, use "table my_table add column my_colunm column_definition AFTER clolumn_B"
And, i just found out that there is no problem with the keyword "FIRST" at all. I read the manual wrongly yesterday.
======================
ALTER [IGNORE] TABLE tbl_name alter_specification [, alter_specification] ...
alter_specification:
ADD [COLUMN] column_definition [FIRST | AFTER col_name ]
....
.....
=======================
So, to add a column at the beginning of the table, use "alter table my_table add column my_colunm column_definition FIRST". To add a column at any other place rather than the beginning of the table, use "table my_table add column my_colunm column_definition AFTER clolumn_B"