I have a table abc
and I am trying to update it but I keep getting the following error: You can't specify target table 'abc' for update in FROM clause
.
Below is my SQL query:
UPDATE abc
SET value_1 = xxx
WHERE value_2 = 'ABC' AND id
IN (Select id FROM abc WHERE value_3 = 'XYZ' AND value_1 = xxx);
Could anyone please tell me how I can make this query work? Many thanks.