Thread: Inserting???

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    singapore
    Posts
    21
    Rep Power
    0
    After i have created a table with 4 columns, am i able to insert another column in between column 2 & 3 and not to the end of the column 4??
    If there is pls also help me with the command to it...
    thanks..
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4492
    ALTER TABLE your_table ADD COLUMN new_column_name [COLUMN DEFINETIONS] AFTER column_name_to_put_new_column_after

    i.e.

    ALTER TABLE mytable ADD COLUMN message VARCHAR(150) AFTER id

    Look here for more info: http://www.mysql.com/documentation/m...ml#ALTER_TABLE

    ---John Holmes...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    singapore
    Posts
    21
    Rep Power
    0
    hi sepodaticreations
    i got it working already..thanks for your help!!!

Similar Threads

  1. Problem in inserting data
    By alka205 in forum MySQL Help
    Replies: 5
    Last Post: January 7th, 2004, 10:23 PM
  2. Refreshing Browser keeps inserting values into DB
    By TomaszBerlin in forum PHP Development
    Replies: 1
    Last Post: December 13th, 2003, 07:59 AM
  3. inserting alot from 1 text box
    By metro in forum PHP Development
    Replies: 13
    Last Post: May 1st, 2003, 12:33 PM
  4. Replies: 3
    Last Post: March 7th, 2003, 11:08 AM
  5. inserting data that already exits..
    By HighTower in forum PHP Development
    Replies: 1
    Last Post: November 14th, 2002, 08:32 PM

IMN logo majestic logo threadwatch logo seochat tools logo