Results 1 to 3 of 3
Thread: Adding a column?
-
08-19-2003, 04:24 PM #1Junior Guru
- 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.
-
08-19-2003, 04:30 PM #2Web Hosting Master
- 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
-
08-19-2003, 04:31 PM #3Web Hosting Master
- 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