SQL> conn scott/scott
Connected.
SQL> set timing on
SQL> SELECT * FROM ( SELECT DEPTNO FROM DEPT) D;
DEPTNO
----------
10
20
30
40
Elapsed: 00:00:00.03
SQL>
1 SELECT * FROM ( SELECT DEPTNO FROM DEPT) D
2 WHERE EXISTS ( SELECT NULL
3 FROM EMP E
4* WHERE E.DEPTNO = D.DEPTNO)
5 /
DEPTNO
----------
10
20
30
Elapsed: 00:00:00.00
SQL>
SQL>
1 SELECT * FROM ( SELECT DEPTNO FROM DEPT) D
2 WHERE NOT EXISTS ( SELECT NULL
3 FROM EMP E
4* WHERE E.DEPTNO = D.DEPTNO)
5 /
DEPTNO
----------
40
Elapsed: 00:00:00.03
SQL>
Halim is a Sr. Database Engineer/Data Architect (in Atlanta, USA) who is an Oracle certified (OCP) DBA, (OCP) Developer, Certified Cloud Architect Professional as well as OCI Autonomous DB specialist with extensive expertise in Database design, configuration, tuning, capacity planning, RAC, DG, Scripting, Python, PL/SQL etc. He achieved 16th position in worldwide first-ever PL/SQL Challenge cup playoff- http://plsql-challenge.blogspot.com/2010/07/winners-of-first-plsql-challenge.html
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
Rownum quiz2 weeks ago
-
-
-
-
-
-
-
Oracle Cloud & Third party tools3 years ago
-
-
-
Moving Sideways8 years ago
-
Upcoming Events...10 years ago
-
No comments:
Post a Comment