I want to update the last generated row (the max(id) row.
I tried this code but it doesn’t work
update person t1
set t1.age = 25
where t1.id = (select max(t2.id) from person t2
where t2.address = 'LA, California');
MySQL tells me that : Error Code: 1093. You can't specify target table 't1' for update in FROM clause
So, I suppose that I cannot reach the same tale while performing operations such as updates.
How can I sole this problem ?
Regards.
You can try as:
or