当前位置:
代码迷
>>
Sql Server
>> 请教两个值的嵌套查询如何做
详细解决方案
请教两个值的嵌套查询如何做
热度:
8
发布时间:
2016-04-27 18:53:13.0
请问两个值的嵌套查询怎么做?
select * from table1 where
(aa,bb) in (select aa,bb from table1 where cc= 'dd ')
如上的一个查询,但是我写的不对,请帮我纠正一下
------解决方案--------------------
select * from table1 a where exists(select 1 from table1 where aa=a.aa and bb=a.bb and cc = 'dd ')
查看全文
相关解决方案