Oracle IN & EXISTS
来源:互联网 发布:java 字符串查找 编辑:程序博客网 时间:2024/06/11 00:53
20-MAR-12 HR @ hdb>
select first_name, last_name, department_id from employees e1 where exists(select * from employees e2 where e2.manager_id = e1.employee_id);FIRST_NAME LAST_NAME DEPARTMENT_ID
-------------------- ------------------------- -------------
Michael Hartstein 20
Shelley Higgins 110
Steven King 90
Neena Kochhar 90
Lex De Haan 90
Alexander Hunold 60
Nancy Greenberg 100
Den Raphaely 30
Matthew Weiss 50
Adam Fripp 50
Payam Kaufling 50
FIRST_NAME LAST_NAME DEPARTMENT_ID
-------------------- ------------------------- -------------
Shanta Vollman 50
Kevin Mourgos 50
John Russell 80
Karen Partners 80
Alberto Errazuriz 80
Gerald Cambrault 80
Eleni Zlotkey 80
18 rows selected.
20-MAR-12 HR @ hdb>
select first_name, last_name, department_id from employees e1 where e1.employee_id in(select manager_id from employees e2);
FIRST_NAME LAST_NAME DEPARTMENT_ID
-------------------- ------------------------- -------------
Michael Hartstein 20
Shelley Higgins 110
Steven King 90
Neena Kochhar 90
Lex De Haan 90
Alexander Hunold 60
Nancy Greenberg 100
Den Raphaely 30
Matthew Weiss 50
Adam Fripp 50
Payam Kaufling 50
FIRST_NAME LAST_NAME DEPARTMENT_ID
-------------------- ------------------------- -------------
Shanta Vollman 50
Kevin Mourgos 50
John Russell 80
Karen Partners 80
Alberto Errazuriz 80
Gerald Cambrault 80
Eleni Zlotkey 80
18 rows selected.
- oracle in,exists,not in,not exists
- oracle exists和in
- Oracle IN & EXISTS
- ORACLE in exists 比较
- Oracle in与exists
- oracle in exists 区别
- Oracle in exists
- oracle 中in 和exists
- oracle中的exists和in
- Oracle in 和 exists 用法
- oracle in与exists疑惑
- Oracle中的EXISTS与IN
- oracle中的exists和in
- oracle In和exists对比
- Oracle中的EXISTS与IN
- 【oracle调优】in和exists
- Oracle中的EXISTS与IN
- Oracle中的exists和in
- Algorithms Review: Divide and Conquer(Binary Search & Merge Sort)
- Oracle SQL string functions
- 关于C# this 指针
- Oracle returns NULL after join
- Spring学习笔记(AOP面向切面编程)
- Oracle IN & EXISTS
- Oracle cursor
- ThinkPHP的调用css,js和图片的路径
- Oracle Block Extent Segment Tablespace
- ORA-19588: archived log recid 181834 stamp 780173554 is no longer valid
- How to get trace file from getbfno.sql gettrcname.sql
- JAVA Socket超时浅析
- Oracle ASM - 条带化
- Oracle Transport Tablespace by RMAN