Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SELECT * FROM emp e LEFT OUTER JOIN dep d ON e.Dno=d.Dno UNION SELECT * FROM emp e RIGHT OUTER JOIN dep d ON e.Dno=d.Dno
これからの結果を別の選択クエリに使用したい。どうやってやるの?
emp テーブルと dep テーブルしかありません。
サブクエリを探していると思います。http://www.w3resource.com/sql/subqueries/understanding-sql-subqueries.php