select * from tbname  where phone_number='number1';

解决方案 »

  1.   

    sorry!
    select * from tbname t where account_id in(
    select 1 from tbname tt where phone_number='number1' and t.account_id =tt.account_id );
      

  2.   

    select * from tbname t where exists (
    select 1 from tbname tt where phone_number='number1' and t.account_id =tt.account_id );
      

  3.   

    to  bzszp(SongZip):
      这样只能查出第一条记录
      

  4.   

    select * from tbname a where a.phone_number in(select phone_number from tbname b where b.account_id in(select account_id from tbname c where c.phone_number = number1));
      

  5.   

    select account_id,phone_number from tabname a where account_id in (select account_id from tabname  where phone_number='number1');