Hi...
I need help on adding a new field in an existing table.
But, the problem is that this field must be added after a particular field in the middle of the table.
Does anyone have a solution?
Printable View
Hi...
I need help on adding a new field in an existing table.
But, the problem is that this field must be added after a particular field in the middle of the table.
Does anyone have a solution?
1. export your table
2. drop table
3. create table like you want
4. import data with ignore=y
or, you can
1. add newfield to your table
2. create table2 as select a, b, newfield, d from your_table
3. recreate any constraints/indexes for table2 from your_Table
4. drop your_table
5. rename table2 to your_table
Thanks o lot Jeff... It worked.
The real question is, why shuld physical position of the column inside a table make any difference?
If for whatever reason your application realy demands a specific order of columns, then you should probably re-check the sanity of an application design....
Application demaning the colums in a certain order!!!! Thats creapy...
Sam