Category: SQL

update…where id in (select…) and mySQL ERROR 1093

What’s wrong with this picture? mysql> update ignore flight set intl=1 where id in (select f.id as id from flight f left join airport a on a.id=f.origin where a.country’mx’ for update); ERROR 1093 (HY000): You can’t specify target table ‘flight’

Posted in Code, General, SQL