这是有效的:
select * FROM Work_Request A where EXISTS ( select 1 from Customer B where (B.lsource&128)!=0 and B.license_id=A.license_id) ;
根据Delete all rows in a table based on another table,此删除也应该有效,但是会出错:
delete FROM Work_Request A where EXISTS ( select 1 from Customer B where (B.lsource&128)!=0 and B.license_id=A.license_id) ;
错误:
错误1064(42000):您的SQL语法有错误;检查 手册,对应右边的MySQL服务器版本 在'A where EXISTS ..
附近使用的语法
...
答案 0 :(得分:0)
你的删除声明应该是这样的
delete A.* FROM Work_Request A
where EXISTS ( select 1 from Customer B where (B.lsource&128)!=0 and B.license_id=A.license_id) ;
你缺少要删除的表的名字......玩得开心: - )