MricsLin
2021-12-23 10:03
采纳率: 100%
浏览 29

MySQL8.0 删除表行数据出现错误,删除失败,这是为啥??

问题现象

在WorkBench表编辑窗口右键删除多行数据的时候,删除失败了

img

问题相关代码

下面是系统的提示:

Error 1064: 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 ')' at line 6 SQL Statement:
 ALTER TABLE `goods_mnt`.`consum_out_record`  
DROP COLUMN `brand`, 
DROP COLUMN `sml_cls`, 
DROP COLUMN `mid_cls`, 
DROP COLUMN `big_cls`, 
CHANGE COLUMN `receive_dep` `receive_dep` VARCHAR(20) CHARACTER SET 'utf8' GENERATED ALWAYS AS ()   

去查过GENERATED ALWAYS AS () 这个用法,也许是我打开方式有问题,没有看到和我类似的问题,最后我尝试一行一行数据的删除,就成功了,想问问大 佬们,这是为啥,是不是GENERATED ALWAYS有什么特殊用法吖?

1条回答 默认 最新

相关推荐 更多相似问题