改变表学生添加s1,s2,s3,s4,s5,s6,s7 int;
ERROR 1064 (42000): 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 's2,s3,s4,s5,s6,s7 int' at line 2发布于 2016-03-01 06:33:22
您可以一次添加多个列,但需要声明每列的类型:
alter table t add column (s5 int, s6 int);您还可以使用:
alter table t add (s5 int, s6 int);但我更喜欢第一个。请注意,括号是强制性的。
您没有提到您的版本,但是语法至少从5.1开始就有效了:
https://dba.stackexchange.com/questions/130865
复制相似问题