I've used This Stack for my query:
UPDATE breads
SET id_supply = (SELECT max(id) FROM supply)
WHERE id = (SELECT MAX(id) FROM breads)
I have added a new record into supply. Now I want my last bread to have the id_supply of the last supply.id
#1093 - Table 'breads' is specified twice,
both as a target for 'UPDATE' and as a separate source for data