exists
select idfrom t1
where exists
(select *
from t2 ,t1
where t2.id=t1.id);
为什么会显示t1中的所有id? 怎么像 数据库。。http://app.qlogo.cn/mbloghead/b39c404c71170ca2bac6 where exists
其中加个你需要判断有误值的字段试试 select id
from t1
where exists
(select 1
from t2
where t2.id=t1.id);
这样吧。
页:
[1]