SQL
stands for Structured Query Language
allows you to create, query and add data to databases
SELECT
… (list the fields to be displayed)
FROM …
(specify the table name)
WHERE
… (list the search criteria)
“wild card”
WHERE clause
is used to select only records satisfying a specified condition:
Operators in where clause:
= != > < >= <= AND, OR, NOT
BETWEEN
between an inclusive range
LIKE
search for a pattern
Sorting:
ORDER BY allows a query to sort data by ascending or descending order
To sort by ascending order:
ORDER BY Surname ASC
To sort by descending order:
ORDER BY Surname DESC