Created
December 2, 2014 00:57
-
-
Save abarth500/170f4d1ff18414a050ba to your computer and use it in GitHub Desktop.
[データベースシステム論] 試行課題2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--試行課題2 | |
---以下の三つのSQLを試してみて、結果からそれぞれの問い合わせの意味・違いを考えよう。 | |
--右結合 | |
SELECT wid, name, district, price | |
FROM wine LEFT JOIN vineyard | |
ON wine.did = vineyard.did; | |
--左結合 | |
SELECT wid, name, district, price | |
FROM wine RIGHT JOIN vineyard | |
ON wine.did = vineyard.did; | |
--全結合 | |
SELECT wid, name, district, price | |
FROM wine FULL JOIN vineyard | |
ON wine.did = vineyard.did; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment