In Single row subquery, inner query returns 'Zero or One' row. Based on the inner query result outer query will return output. The operators that can be used with single-row subqueires are =, >, >=, <, <=, and <>.
Example:
SELECT * FROM EMPLOYEE
WHERE Dept_ID =
(
SELECT
DEPTID
FROM DEPT
WHERE DeptID = 10
)
No comments:
Post a Comment