select * from c where a in (select a from talbeA where d = '') 
      and b in (select b from talbeA where d = '')
      and c in (select c from talbeA where d = '')

解决方案 »

  1.   


    select xx 
    from (
    select xx
    from(
    select xx
    from (select a,b,c from tableA where d = '')a,table b
    where ...
    )b,tablec 
    where ....
    )c,tabled
    where ...
      

  2.   

    tryselect * from tableb where exists (select a,b,c from tableA where d = '')
      

  3.   

    嵌套子查询
    select yy,zz 
    from Tab1 inner join (
       select xx from Tab2 )Tmp on Tmp .xx=Tab1.yy
    where ...
    ...
      

  4.   

    啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊是这个意思啊!
    第一次查询返回的数据是一条,这条数据的字段就是A,B,C.....,根据A,B,C在去查寻的时候返回的数据也是一条但是,A返回的这条数据可能是一个字段~B可能是三个或者更多什么的!a而且A的查寻条件和B的查寻条件可能不一样
    就是说
    SELECT A ,B...FROM table0
    然后查寻出来A,B.......这些数据
    然后再根据这些数据
    SELECT X FROM tableA where 
    条件='上面查出来的A'
    但是B的条件除了=上面查出来的B以外还有一些别的条件
    SELECT Y,Z FROM tableB where 条件='上面查出来的B' AND(条件="xxxxxxxxxxx")
     
      

  5.   

    大概意思是这样啊SQL1:select a,b,c,d,e,f, from table0 where g = 'xx';
    然后再根据返回的结果集的分别~a去tableA查出一个需要的数据~~b去tableB查出一个需要的数据
    这其中有的检索条件是3个有的是两个有的需要select二个结果有的需要select三个结果
    比如:得到SQL1返回的记录集和以后
    返回的数据A可能这样操作阿
    SELECT A1,A2 FROM 
    tableA where A3=a and xxxx
    而返回的数据B可能是这样操作
    SELECT B1 FROM tableB where B3=b他们之间不一样阿