Advanced Search

Results 1 to 2 of 2

Thread: How to add new column to an existing table

  1. #1
    Join Date
    May 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to add new column to an existing table

    Hi everyone,
    I need help in this matter. I have this form in which the user insert his details, and chose which detail to add and which not and he can add a new field by his own which doesn't exist before. So this new field is a new column, so I just want to know how to add this column into an existing table.
    I'm using sql server 2000
    Many Thanx
    Yoya

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,626
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    You can add a new field using ALTER TABLE statement

    Code:
    ALTER TABLE table_name ADD column_name datatype
    Ex:
    Code:
    ALTER TABLE Employee ADD City varchar(30)
    * All the capital letters are reserved words

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
  •