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, 5042👍, 0💬
Popular Posts:
How to set a cookie with the contents of a textbox ? Values stored in cookies may not have semicolon...
How do I force the Dispose method to be called automatically, as clients can forget to call Dispose ...
If XML does not have closing tag will it work? No, every tag in XML which is opened should have a cl...
What is the difference between CALL_FORM, NEW_FORM and OPEN_FORM? CALL_FORM: start a new form and pa...
How To Concatenate Two Character Strings? - MySQL FAQs - Introduction to SQL Basics If you want conc...