Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    205

    Adding a column?

    Is there any quick and easy way to add a new column to an existing table in a MySQL database? TIA.

  2. #2
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307
    You mean new field?

    http://www.mysql.com/doc/en/ALTER_TABLE.html

    For example, this mySQL code will add 'new_field' at the end of the table test with a VARCHAR type.

    Code:
    ALTER TABLE `test` ADD `new_filed` VARCHAR( 255 ) NOT NULL ;
    How's my programming? Call 1-800-DEV-NULL

  3. #3
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,307
    BTW, you can use phpMyAdmin if you don't know mySQL syntax
    How's my programming? Call 1-800-DEV-NULL

Posting Permissions

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