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, 736👍, 0💬
Popular Posts:
How to change the data type of an existing column with "ALTER TABLE" statements in SQL Server? Somet...
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for ma...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How To Display a Past Time in Days, Hours and Minutes in MySQL? You have seen a lots of Websites are...
How To Create a Stored Function in Oracle? A stored function is a function with a specified name and...