TABLE
The TABLE
expression retrieves all rows from a single table.
Syntax
Field | Use |
---|---|
table_name | The name of the tablefrom which to retrieve rows. |
Details
TABLE
expressions can be used anywhere that SELECT
expressions are valid.
The expression TABLE t
is exactly equivalent to the following SELECT
expression:
SELECT * FROM t;
Examples
Using a TABLE
expression as a standalone statement:
TABLE t;
a
---
1
2
Using a TABLE
expression in place of a SELECT
expression:
TABLE t ORDER BY a DESC LIMIT 1;
a
---
2