I have an issue whereby a query that works perfectly fine in Postgres fails in MySQL. I have checked out other stack questions and googled the error but still cannot quite figure out what is wrong.
insert into queue (name, id) values ('name',(select max(id)+1 from queue));
Now it just fails with the following error
ERROR 1093 (HY000): You can't specify target table 'queue' for update in FROM clause