1Used to select data from a database, which is then returned in a results set.
2Example 1: Selects all columns from all users.
3SELECT * FROM users;
4Example 2: Selects the first_name and surname columns
5from all users.xx
6SELECT first_name, surname FROM users;
1select [all/distinct] <COL1>, <COL2>, <COL3>
2from <TABLE_NAME>
3[join <JOIN_CONDITION>]
4[where <CONDITION>]
5[group by <COLUMN_NAME>]
6[having <SEARCH_CONDITION>]
7[order by <SORT_SPECIFICATION>]
8
9
10/*
11Specifically for SQL -> Oracle
12
13LEGEND:
14[...] : optional entries
15<...> : your specific entry
16*/
1SELECT *
2FROM table
3WHERE condition
4GROUP BY expression
5HAVING condition
6{ UNION | INTERSECT | EXCEPT }
7ORDER BY expression
8LIMIT count
9OFFSET start