在cmd命令行下给mysql表中添加字段报错

犇仐 2017-06-06 08:49:10
我写的语句没毛病吧在cmd命令行中
'alert table student age int(11) not null default '0';
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 'alert
table student age int(11) not null default '0'' at line 1
...全文
428 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluetata 2017-06-07
  • 打赏
  • 举报
回复
LZ 的 ‘0’变成字符串了~~~~ int值 0 就可以了
二月十六 2017-06-06
  • 打赏
  • 举报
回复
alert table student add age int(11) not null default  0 ;
0与1之间 2017-06-06
  • 打赏
  • 举报
回复
alert table student add age int not null default 0

594

社区成员

发帖
与我相关
我的任务
社区描述
提出问题
其他 技术论坛(原bbs)
社区管理员
  • community_281
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧