A restaurant provides wine pairings for most food items on its menu. The structure of two of the tables containing this information is shown below
Join these two tables by their id columns to find the country that the recommended wine is produced in. Here is the code I have tried:
SELECT country, item
FROM regions
INNER JOIN pairing
regions.id = pairing.id
ORDER BY item
LIMIT 5;
But the compiler gives the solution as:
SELECT country, item
FROM regions
INNER JOIN pairing
USING(id)
ORDER BY item
LIMIT 5;
OUTPUT:
country | item |
---|---|
France | caviar |
Italy | curry |
Italy | grilled vegetables |
Argentina | lamb |
Germany | roast duck |
Doubt:
I want to clear if there is any difference bwtween USING and equal statement on id or they are same?