Oracle中交集 INTERSECT 的使用 oracleintersect
程序员文章站
2022-05-07 10:24:24
...
intersect运算
返回查询结果中相同的部分
exp:查询两个人的共同好友,表 org_optor_friends 为好友表。
select friend_id from org_optor_friends f1 where f1.optor_id='ligp' and status='1'
intersect
select friend_id from org_optor_friends f2 where f2.optor_id='shangtao' and status='1'
下一篇: Unix环境高级编程笔记:3、文件I/O