plsql exists和inner join有什么区别
答案:2 悬赏:50 手机版
解决时间 2021-03-01 09:56
- 提问者网友:辞取
- 2021-03-01 04:19
plsql exists和inner join有什么区别
最佳答案
- 五星知识达人网友:等灯
- 2021-03-01 04:58
exists 是判断是否有结果。如
select a.* from tablea a
where exists (select 1 from tableb b where b.id=a.id);
只能查到表a的字段。
inner join是内连接,两个表进行连接用,只去两个表中都存在的数据。
select a.*, b.*
from tablea a inner join table b
on a.id=b.id
可查到表a和b所有的字段。
select a.* from tablea a
where exists (select 1 from tableb b where b.id=a.id);
只能查到表a的字段。
inner join是内连接,两个表进行连接用,只去两个表中都存在的数据。
select a.*, b.*
from tablea a inner join table b
on a.id=b.id
可查到表a和b所有的字段。
全部回答
- 1楼网友:拜訪者
- 2021-03-01 06:35
没看懂什么意思?
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯