Scalar Subquery

 

2)Where 절에서의 Scalar Subquery

SELECT employee_id, last_name

   FROM employees e

  WHERE ( ( SELECT location_id

                      FROM departments d

                    WHERE e.department_id = d.dapartment_id)

                    =

                  ( SELECT location_id

                    FROM locations I

                   WHERE STATE_province = 'California')

          )

 

3) Order By 절에서의 Scalar Subquery

SELECT employee_id, last_name

  FROM employees e

ORDER BY (

     SELECT department_name

     FROM departments d

     WHERE e.department_id = d.department_id

   )

 

 

+ Recent posts