Skip to content

SELECT Statement

OneAndonlyFinbar edited this page Jan 17, 2022 · 9 revisions

The SELECT command can be used to select certain aspects of a table.

Syntax

SELECT
[ALL | COLUMN | AGGREGATE_FUNCTION]
[FROM table]
[WHERE condition(s)]

Compatibility

Aggregate Functions

Name Description
MAX() Maximum value for column
MIN() Minimum value for column

Examples

Selecting all rows

SELECT * FROM users

Select single column

SELECT money FROM users

Selecting maximum value in money column

SELECT MAX(money) FROM users

Selecting maximum value in money column WHERE user is above level 10

SELECT MAX(money) FROM users WHERE level > 10

Clone this wiki locally