-2
I am testing the operation of a subquery (subconsulta) and executing the command below:
DELETE FROM pessoa
WHERE id IN(SELECT id FROM pessoa
WHERE id=2
);
the following error occurs:
You can’t specify target table 'pessoa' for update in FROM clause
Why don’t you just do
delete from pessoa where nome='isac'
?– Woss
Why I wanted to test the operation of a subquery, you see?
– gai sensei
Related: How to delete the last record from a table?
– Woss