Results 1 to 8 of 8

Thread: how to insert a new column between 2 column in a Table.This is for for MS SQL Server

  1. #1
    Join Date
    Sep 2003
    Posts
    2

    how to insert a new column between 2 column in a Table.This is for for MS SQL Server

    hi,

    how to insert a new column between 2 column in a Table.This is for for MS.

    thx
    -a

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You have to drop and recreate the table. You can do it from enterprise manager which drops and recreates in the background.

  3. #3
    Join Date
    Sep 2003
    Posts
    2
    so is it easier to create the column as the last coloumn of the table, do we need to drop the table for that too.

  4. #4
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    alter table tablename add
    will add the column at the end.

    look in syscolumns for colorder

  5. #5
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If you are using sql 7.0 or 2000 you can add a column using alter table syntax without dropping a table.

  6. #6
    Join Date
    Aug 2008
    Posts
    3

    insert a new column beteen two columns in a table in mysql

    alter table <tablename> add column <column name> datatype after <column name>

  7. #7
    Join Date
    Aug 2008
    Posts
    3
    alter table <tablename> add column <column name> datatype after <column name>

  8. #8
    Join Date
    Aug 2008
    Posts
    3

    insert a column between two columns

    Quote Originally Posted by aphagwani
    hi,

    how to insert a new column between 2 column in a Table.This is for for MS.

    thx
    -a
    alter table <tablename> add column <column name> datatype after <column name>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •