Sql 选择中的子查询
我如何使这个子工作Sql 选择中的子查询,sql,select,subquery,Sql,Select,Subquery,我如何使这个子工作 Select a.group IN (select b.ref from b) from a 您似乎想要: select a.* from a where exists (select 1 from b where b.ref = a.group); 您希望此查询执行什么操作?从a中选择a.group,其中a.group在从b中选择b.ref中使用SQL问题您还应始终标记使用的DBMS MySQL、SQL Server、Oracle、PostgreSQL等。。。。
Select a.group IN (select b.ref from b) from a
您似乎想要:
select a.*
from a
where exists (select 1 from b where b.ref = a.group);
您希望此查询执行什么操作?从a中选择a.group,其中a.group在从b中选择b.ref中使用SQL问题您还应始终标记使用的DBMS MySQL、SQL Server、Oracle、PostgreSQL等。。。。