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);
SQL BETWEEN
SQL BETWEEN: The BETWEEN operator is used in a WHERE clause to select a range of
data between two values. The values can be numbers, text, or
dates..............
SQL CREATE VIEW: A view is a virtual table. A view contains rows and columns,
just like a real table..............
The IN operator allows you to specify multiple values in a WHERE
clause................
SQL MINUS returns all rows in the first query that are not returned in the
second query..................
SELECT DISTINCT: It is used to select unique records from a table. Some tables
may have duplicate values for a column. Distinct will eliminate these
duplications...........
|