SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: add a column

  1. #1
    boiler up blackdog's Avatar
    Join Date
    Jul 2002
    Location
    Purdue
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    add a column

    is there a way to add a column to an existing table?

    thanks!

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Code:
    alter table foo add column bar integer
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot CatsEyeDesigns's Avatar
    Join Date
    Dec 2003
    Location
    Florida
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there are lots of ways... easiest way is if you have phpMyAdmin available.

    If so, select your database in the left column, then select the table you want to modify (once again, in the left column).

    Then, in the right column, you'll see a section that says "add new field" with an input box to enter the number of fields you're adding.


Bookmarks

Posting Permissions

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