SQL EXISTS - Introduction and syntax
SQL - Dec 03, 2008 at 18:00 PM by Rajmeet Ghai
Explain the SQL EXISTS statement. Write SQL syntax for the SQL EXISTS statement
along with an example.
SQL EXISTS: If the subquery returns at least one row the EXISTS
condition is considered "to be met".
Syntax:
SELECT columns FROM tables WHERE EXISTS ( subquery );
Example:
SELECT * FROM employee WHERE EXISTS (select * from appraisal where
employee.employee_id = appraisal.employee_id);
|