Update table
Set class = 0
Where TOTAL_HOURS = (SELECT min (TOTAL_HOURS) from tutions);
Produced Error:
Table name specified twice both as a target for update and separate source for data.
How can I fix this?
I am guessing you are trying to update tutions with tutions.
Make a nested subquery so that MySQL materializes it and is no longer the same table.
Try this:
Update tutions
Set class = 0
Where TOTAL_HOURS = (select * from (SELECT min (TOTAL_HOURS) from tutions) t);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With