mysql 修改字段名问题
我的表中字段名:+-----------------+-------------+-|Field|Type|+-----------------+------------...
我的表中字段名:
+-----------------+-------------+-
| Field | Type |
+-----------------+-------------+-
| username | varchar(40) |
| count(username) | bigint(21) |
+-----------------+-------------+-
想将 count(username) 改为 count,不要括号了,我用的语句:
alter table tablename change count(username) count bigint(21);
却报错:
MySQL server version for the right syntax to use near 'count(username) count bigint(21)' at line 1
是不是因为有括号的原因啊?
因为试过没有括号的情况下是可以的!! 展开
+-----------------+-------------+-
| Field | Type |
+-----------------+-------------+-
| username | varchar(40) |
| count(username) | bigint(21) |
+-----------------+-------------+-
想将 count(username) 改为 count,不要括号了,我用的语句:
alter table tablename change count(username) count bigint(21);
却报错:
MySQL server version for the right syntax to use near 'count(username) count bigint(21)' at line 1
是不是因为有括号的原因啊?
因为试过没有括号的情况下是可以的!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询