错误代码: 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 xxxxx
删除时定义了表别名,会报错.
解决办法是:
要在delete 与 from 之间加上 表的别名,这样就行了
如下:
DELETE t
FROM iot_bustype_sensortype_relation AS t
WHERE t.id IN (1,2)