Relations SQL
Relations SQL
SQL
By:
Neeraj Namdev
PGT(CS)
JNV Pathnamthitta
ORDER BY CLAUSE
Note:- If order is not specifies that by default the sorting will be performed in
ascending order.
GROUP BY
The GROUP BY clause can be used in a SELECT statement to
collect data across multiple records and group the results by one
or more columns.
EXAMPLE :
HAVING CLAUSE
The HAVING clause is used in combination with the GROUP BY
clause. It can be used in a SELECT statement to filter the records
that a GROUP BY returns.
JOINS
A JOIN is a query through which we can extract
queries from two or more tables. It means, it
combines rows from two or more tables. Rows in
one table can be joined to rows in another table
according to common values existing in
corresponding columns.
TYPES OF JOIN
Non-Equi Join
Natural Join
CARTESIAN PRODUCT
OR
CROSS JOIN
MySqL does not support Intersection operator so here we use join operator
to achieve minus operation in MySQL.