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 );
select * from tbname t where exists ( select 1 from tbname tt where phone_number='number1' and t.account_id =tt.account_id );
to bzszp(SongZip): 这样只能查出第一条记录
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));
select account_id,phone_number from tabname a where account_id in (select account_id from tabname where phone_number='number1');
select * from tbname t where account_id in(
select 1 from tbname tt where phone_number='number1' and t.account_id =tt.account_id );
select 1 from tbname tt where phone_number='number1' and t.account_id =tt.account_id );
这样只能查出第一条记录