如果author_type的字段类型为varchar
用这个语句时会报错:在将 varchar 值 ‘言论‘ 转换成数据类型 int 时失败。
update author set author_type=‘简讯‘ where author_type=2
需要改为
update author set author_type=‘简讯‘ where author_type=‘2’
在将 varchar 值 '言论' 转换成数据类型 int 时失败。
原文:https://www.cnblogs.com/net5x/p/12398418.html