Reputation: 3390
I am getting a syntax error when trying to run this query:
delete a from db.tablea a where a.id in (select id from db2.ids) limit 10000;
Can someone advise a way to rework this query and provide this same logic?
Upvotes: 0
Views: 168
Reputation: 98528
You are using the multi-table syntax, which allows joins (and deleting from any of the joined tables) but not limit. Use the single table syntax instead:
delete from db.tablea where id in (select id from db2.ids) limit 10000;
Upvotes: 1