sql select

Solutions on MaxInterview for sql select by the best coders in the world

showing results for - "sql select"
Flo
05 Feb 2019
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;
Giulio
15 May 2016
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*/
Elias
29 Oct 2018
1SELECT * FROM TABLE_NAME;
Valerio
18 Nov 2020
1Everything in brackets is optional.
2SELECT [all/distinct] <COL1>, <COL2>, <COL3>
3FROM <TABLE_NAME>
4[JOIN <JOIN_CONDITION>]
5[WHERE <CONDITION>]
6[GROUP BY <COLUMN_NAME>]
7[HAVING <SEARCH_CONDITION>]
8[ORDER BY <SORT_SPECIFICATION>]
Calie
28 Sep 2017
1SELECT * FROM products WHERE stock_count <= 10 ORDER BY stock_count ASC;
Noé
05 May 2018
1Mit SELECT können Daten aus der Datenbank abgefragt werden. Es ist die am 
2meissten verbreitete Art.
3
4  SELECT name
5  FROM country
6  WHERE region = (
7      SELECT region
8      FROM country
9      WHERE name = 'Brasilien'
10      )
11