select a, b,c from table_1
where
a=2968606600以上语句查出b后,再以b为条件进行or的查询,如下:select a, b,c from table_1
where
a=2968606600
or b=32423423;怎么在一条语句中实现这个功能? 
讲下思路也是可以????

解决方案 »

  1.   

    select a, b,c from table_1 
    where a=2968606600
    or b=(select b from table_1 where a=2968606600)
      

  2.   

    要注明b只能是一个值
    select a, b,c from table_1  
    where a=2968606600
    or b=(select b from table_1 where a=2968606600 limit 1)
      

  3.   

    SELECT * FROM (
    select a, b,c from table_1
    where
    a=2968606600) B WHERE B=32423423ORselect a, b,c from table_1  
    where a=2968606600
    or b IN (select b from table_1 where a=2968606600)
      

  4.   

    SELECT * FROM (
    select a, b,c from table_1
    where
    a=2968606600) B WHERE B=32423423
      

  5.   


    如果我的table_1是多个表的union all,然后我用了别名,在IN条件里面使用别名却不成功,怎么实现啊???分都给你!