Hello all,
I’m trying to use this sql to sincronize details rows and master data:
UPDATE orders_details
INNER JOIN orders ON orders_details.Id_Ord = orders.Id_Ord
SET orders_details.OrderID = ( SELECT orders.OrderID FROM orders WHERE orders_details.Id_Ord = orders.Id_Ord )
I got this error…
#1242 - Subquery returns more than 1 row
What does it means ?
Is it correct to add on sub query …
GROUP BY orders_details.Id_Ord
In this way it do not give error but I don’t know if it’s correct