Is there anything wrong with this statement? It gives syntax error: delete from table1 t1 left join table2 t2 on t1. Id=t2.id, where t2.id is empty
P粉148434742
2023-09-05 20:04:37
<p>Is there anything wrong with this statement? Syntax error occurred in mysql</p>
<pre class="brush:php;toolbar:false;">delete
from table1 t1
left join table2 t2 on t1. Id=t2.id
where t2.id is null</pre>
<p>Please give us your suggestions</p>
When joining, you need to specify which table you want to delete from