Use the following syntax:
ALTER TABLE your_table MODIFY COLUMN column1 datatype, MODIFY COLUMN column2 datatype, ... ... ... ... ... ... ... ... ... ...
Based on this, your ALTER command should be:
ALTER TABLE webstore.Store MODIFY COLUMN ShortName VARCHAR(100), MODIFY COLUMN UrlShort VARCHAR(100)
Note that:
- There are no second brackets in the
MODIFY statement. - I used two separate
MODIFY statements for two separate columns.
This is the standard format of the MODIFY statement for the ALTER command for multiple columns in a MySQL table.
Take a look at the following: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html and Edit multiple columns in one statement
Capt. Jack Sparrow Oct 23 '14 at 4:29 2014-10-23 04:29
source share