Hi Ritu,
I’m on the same course and topic right now ’ Compound Join Conditions -05 ’ , and wondering if what you shared here is the actual correct Syntax to pull the information up?
SELECT *
FROM Order_Items OI
INNER JOIN Order_Item_Notes OIN
ON OI.Order_ID = OIN.Order_ID
AND OI.Product_ID = OIN.Product_ID;
/*
No record at all!
*/
SELECT *
FROM Order_Item_Notes;
SELECT *
FROM Order_Items
WHERE Order_ID=1;
UPDATE Order_Item_Notes
SET Product_ID = 4 # It was Product_ID=2
WHERE Order_ID = 1;
SELECT *
FROM Order_Item_Notes;
SELECT *
FROM Order_Items OI
INNER JOIN Order_Item_Notes OIN
ON OI.Order_ID = OIN.Order_ID
AND OI.Product_ID = OIN.Product_ID;
Please check this out.
For Update you haave to go to Edit -->Preferences–>SQL Editor — Scroll down — Safe Update — Unclick that Tab then OK
Close MySQL
Open again
Go to USE sql_store;
Then the Query share above…
Do let me know if any issue