我试过执行这个sql语句
delete
from reclamo r
where exists ( select 1 from reclamo r
join cliente c on r.cod_cliente = c.cod_cliente
join localidad l on c.cod_localidad = l.cod_localidad
where l.descripcion = 'San Justo');
删除“San justo”镇的客户提出的所有索赔,但它显示“错误代码:1064。您的 SQL 语法有错误;请查看与您的 MySQL 服务器版本相对应的手册以获取正确的语法使用'r where exists (select 1 from reclamo r join cliente c on r.cod_cliente' at line 2" 附近'r where exists" 有人知道我该如何解决这些错误吗?
sqlfiddle 在这里:http ://sqlfiddle.com/#!2/b2771