今天在开发中执行一条mysql 的 delete语句也没有报错,就是影响行数为0,下图例子:
直接在mysql客户端执行这条sql
delete from t_pharmacy_bdgx b where b.id=’ bdbf40aa706c11e9813e58fb84b226bc’
提示语法错误
改成这样就没问题了,正确执行了,下图例子:
在mysql 客户端执行也同样成功:
delete from t_pharmacy_bdgx where id=‘bdbf40aa706c11e9813e58fb84b226bc’
在举个列子一看就明白:
如:
delete from student a where a.id in (1,2);(执行失败)
select a.* from student a where a.id in (1,2);(执行成功)