Hi, Select closing From balance Where account_no = 12 Limit 1 returns an error "You can't specify target table 'balance' for update in FROM clause"
Where is mistake?
Thanks

AFTER INSERT ON Close
BEGIN
Insert into balance (date, opening, account) 
Values (CURDATE(), (Select closing From balance Where account_no = 12 Limit 1), 12);
END

Hello

Your mistake! You cannot do that !

-----
tesu

I tried but didn't work. I dont use this logic. Therefore, ignore this post.
Thanks for your reply tejusi/