Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Use Subqueries with the EXISTS Operator
How To Use Subqueries with the EXISTS Operator? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements
✍: FYIcenter.com
A subquery can be used with the EXISTS operator as "EXISTS (subquery)", which returns true if the subquery returns one or more rows. The following statement is a good example of "EXISTS (subquery)". It returns rows from employees table that there are rows existing in the departments table linked to the employees table with location_id = 1700.
SQL> SELECT first_name, last_name FROM employees e 2 WHERE EXISTS ( 3 SELECT * FROM departments d 4 WHERE e.department_id = d.department_id 5 AND d.location_id = 1700 6 ); FIRST_NAME LAST_NAME -------------------- ------------------------- Steven King Neena Kochhar Lex De Haan Nancy Greenberg Daniel Faviet John Chen Ismael Sciarra ......
2007-04-19, 4963👍, 0💬
Popular Posts:
What is CAR (Causal Analysis and Resolution)? The basic purpose of CAR is to analyze all defects, pr...
What are the different elements in Functions points? The different elements in function points are a...
An application needs to load a library before it starts to run, how to code? One option is to use a ...
What will be printed as the result of the operation below: #define swap(a,b) a=a+b;b=a-b;a=a-b; void...
when should the volatile modifier be used? The volatile modifier is a directive to the compiler's op...