kei
You will have to drop and the create a table. Why is so important to you a
column's order?
Do you try to add a column that is PK?
>I want to add a column in a table and placed it in the first column, how to
> write this sql statement?
> (the alter table [tablename] add [columnName] ) only add the new column in
> the last column.
Hi
if you alter table and add column, it will add new column at end. but if you
want to add column at first, you have to copy the table structure and data
into another temporary table. and create New table with addition of new
column, and again save data from temporary table into Newly created table
and finally drop the temporary table..
thanks and regards
Kishore
> I want to add a column in a table and placed it in the first column, how to
> write this sql statement?
> (the alter table [tablename] add [columnName] ) only add the new column in
> the last column.
kei - 03 Jul 2008 11:06 GMT
Oh!! there is a "generate change script" in the tool bar, I can just add a
column and drag and drop the column to the top, and then press the "generate
change script" to generate the script!!
> Hi
>
[quoted text clipped - 11 lines]
> > (the alter table [tablename] add [columnName] ) only add the new column in
> > the last column.