ALTER TABLE tmp DROP COLUMN col_1, DROP COLUMN col_2, DROP COLUMN col_3, DROP COLUMN col_4; Or, for short, ALTER TABLE tmp DROP col_1, DROP col_2, DROP col_3, DROP col_4;
> -----Original Message----- > From: Adam Fortuno [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 12, 2003 6:22 PM > To: MySQL List > Subject: Multiple items in an ALTER TABLE statement > > > Was in the midst of doing something today and I attempted to drop a > number of columns in a table with the following: > > ALTER TABLE tmp DROP COLUMN col_1, col_2, col_3, col_4; > > Unfortunately MySQL gave me an error reading: > > ERROR 1064: You have an error in your SQL syntax. Check the manual > that corresponds to your MySQL server version for the right syntax to > use near 'col_2, col_3, col_4' at line 1 > > Can you not have multiple columns names in an alter statement? > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?> [EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]