SELECT DISTINCT - Introduction and syntax
Explain the SELECT DISTINCT statement. Write SQL syntax for the SELECT DISTINCT
statement along with an example.
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.
Syntax:
SELECT DISTINCT column_name(s) FROM table_name
Example:
SELECT DISTINCT mobile_num FROM Employees
GROUP BY: It is used with aggregate functions to group the result-set by one or
more columns................
SQL EXISTS: If the subquery returns at least one row the EXISTS condition is
considered "to be met"...............
SQL CONCATENATE: This clause combine together (concatenate) the results from
several different fields...............
SQL EXISTS: If the subquery returns at least one row the EXISTS condition is
considered "to be met"...............
SQL MINUS returns all rows in the first query that are not returned in the
second query..................
|