[英]How to use result of sql query/queries for another select query?
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
I want to use the result coming from this to another select query. 我想使用来自此的结果到另一个选择查询。 How can I do that?
我怎样才能做到这一点?
I only have emp and dep tables. 我只有emp和dep表。
I think you are looking for subqueries. 我认为您正在寻找子查询。 http://www.w3resource.com/sql/subqueries/understanding-sql-subqueries.php
http://www.w3resource.com/sql/subqueries/understanding-sql-subqueries.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.