Sep 20, 2003 #1 cabernet Technical User Feb 24, 2003 75 PK I cannot figure the correct syntax to add many fields in an existing table; in one shot from PHP MyAdmin alter table xxxx add foo varchar 50 not null, foo_2 text not null; etc.... thanks regards
I cannot figure the correct syntax to add many fields in an existing table; in one shot from PHP MyAdmin alter table xxxx add foo varchar 50 not null, foo_2 text not null; etc.... thanks regards
Sep 20, 2003 #2 sleipnir214 Programmer May 6, 2002 15,350 US According to the MySQL online manual (http://www.mysql.com/doc/en/ALTER_TABLE.html), it should be ALTER TABLE foo ADD (foo varchar(10) not null, bar int, fubar decimal(6,2)) Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!! Upvote 0 Downvote
According to the MySQL online manual (http://www.mysql.com/doc/en/ALTER_TABLE.html), it should be ALTER TABLE foo ADD (foo varchar(10) not null, bar int, fubar decimal(6,2)) Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!!
Sep 20, 2003 Thread starter #3 cabernet Technical User Feb 24, 2003 75 PK thanks much for the correct syntax I went before posting to the "MySQL alter table" it does not mention anything about alter table hmmm, I ewar glasses did read it twice; where is it? Upvote 0 Downvote
thanks much for the correct syntax I went before posting to the "MySQL alter table" it does not mention anything about alter table hmmm, I ewar glasses did read it twice; where is it?
Sep 20, 2003 #4 sleipnir214 Programmer May 6, 2002 15,350 US I don't understand your question. But if the gist of your question was, "How did you find that information in the MySQL online manual?", then the answer is that I went to http://www.mysql.com/doc/en and entered "alter table" in the manual lookup entry field on the left-hand side of the screen. Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!! Upvote 0 Downvote
I don't understand your question. But if the gist of your question was, "How did you find that information in the MySQL online manual?", then the answer is that I went to http://www.mysql.com/doc/en and entered "alter table" in the manual lookup entry field on the left-hand side of the screen. Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!!
Sep 21, 2003 #5 tarn Technical User Aug 19, 2001 534 GB Yes Cabernet, you glasses must have been steamed up at the time ...... see: http://www.mysql.com/doc/en/ALTER_TABLE.html This part: alter_specification: ADD [COLUMN] create_definition [FIRST | AFTER column_name ] | ADD [COLUMN] (create_definition, create_definition,...) | ADD INDEX [index_name] (index_col_name,...) | ADD PRIMARY KEY (index_col_name,.............. Where (create_definition = foo_varchar(10) not null, create_definition = bar_int, ........) Laurie. Upvote 0 Downvote
Yes Cabernet, you glasses must have been steamed up at the time ...... see: http://www.mysql.com/doc/en/ALTER_TABLE.html This part: alter_specification: ADD [COLUMN] create_definition [FIRST | AFTER column_name ] | ADD [COLUMN] (create_definition, create_definition,...) | ADD INDEX [index_name] (index_col_name,...) | ADD PRIMARY KEY (index_col_name,.............. Where (create_definition = foo_varchar(10) not null, create_definition = bar_int, ........) Laurie.
Sep 21, 2003 #6 tarn Technical User Aug 19, 2001 534 GB Sorry: Where (create_definition = foo varchar(10) not null, create_definition = bar int, ........) !:¬o L. Upvote 0 Downvote
Sorry: Where (create_definition = foo varchar(10) not null, create_definition = bar int, ........) !:¬o L.
Sep 21, 2003 Thread starter #7 cabernet Technical User Feb 24, 2003 75 PK Hello Laurie thanks I figured I was wearing sun glasses Henry Upvote 0 Downvote