I HAVE TWO TABLES. AND ORDER TABLE AND A PRODUCTS TABLE. THE ORDERS TABLE HAS THE ORDER ID AND THE ShipVia INFORMATION CONTAINED IN IT.
THE PRODUCTS TABLE HAS THE PRODUCT NAME AND PRODUCT ID CONTAINED ON THIS TABLE.
I WAS TRYING TO REPLY TO THIS REQUEST:
Write a subquery that shows all of the products that were shipped via the same method as OrderID 10248.
The shippedVia field contains one digit numbers on the Orders table from 1 to 5.
THIS IS THE CODE I TRIED TO CREATE:
WHERE EXIST (SELECT * FROM Orders WHERE ShipVia = 3)
THIS IS THE ERROR MESSAGE I RECEIVED
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'SELECT'.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ')'.
WHERE AM I MAKING MY MISTAKES AND WHAT WOULD BE THE CORRECT SYNTAX?