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, 5065👍, 0💬
Popular Posts:
What Is the Data Pump Import Utility? - Oracle DBA FAQ - Loading and Exporting Data Oracle Data Pump...
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written...
How can I include comments in HTML? An HTML comment begins with "<!--", ends with "-->...
What is difference between custom JSP tags and JavaBeans? Custom JSP tag is a tag you defined. You d...
If we have the following in a Java code: String s="abc"; String s2="abc"; Then what will be output o...