随手记录——MySQL数据库设置唯一性约束遇到的问题
问题:通过下面的sql语句设置唯一性约束的时候,报:used in key specification without a key length错误。alter table t_user add unique key `accountid_uq` (accountid); 经过查询网上的答案,原因是设置了错误的数据类型,我之前错误地设置了accountid为text类型。 解决方法是,将acco
原创
2017-07-09 23:11:01 ·
1054 阅读 ·
0 评论