hi guys! I have a table with 3 columns but i realized that i need to add 1 column between column 2 and 3. Can anybody please help me on how to do that? Thanks in advance!just create a new table and populate it like this:
insert into NewTable
select col1, col2, 'some value', col3 from OldTable
then you can drop your old table. be sure to create indexes, fks, etc on the new table as appropriate once it's populated.|||i need to add 1 column between column 2 and 3.
The physical order of data in a database has no meaning.
Just use alter table and add the field to the end.
You can always specify the display in your select statements.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment