Collections:
Use Subqueries with the IN Operator in Oracle
How To Use Subqueries with the IN Operator in Oracle?
✍: FYIcenter.com
A subquery can be used with the IN operator as "expression IN (subquery)". The subquery should return a single column with one or more rows to form a list of values to be used by the IN operation. The following tutorial exercise shows you how to use a subquery with the IN operator:
SQL> SELECT first_name, last_name FROM employees 2 WHERE department_id IN ( 3 SELECT department_id FROM departments 4 WHERE location_id = 1700 5 ); FIRST_NAME LAST_NAME -------------------- ------------------------- Steven King Neena Kochhar Lex De Haan Nancy Greenberg Daniel Faviet John Chen Ismael Sciarra ......
2019-09-27, 759👍, 0💬
Popular Posts:
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to...
Where to find answers to frequently asked questions on Transaction Management: Commit or Rollback in...
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...
What is mscorsvw.exe - Process - Microsoft .NET Framework NGEN in SQL Server? Process mscorsvw.exe i...