ReferenceSQL ReferenceStatements

SELECT

Read data through the Query API with SELECT or WITH.

SELECT

The Query API accepts read queries that start with SELECT or WITH. Each request contains one statement. It also accepts selected write and management statements. See SQL statements for those forms. These interface limits are separate from RawTree's full SQL capabilities.

Syntax

SELECT <expressions> [FROM <table>] [WHERE <condition>]
  [GROUP BY <expressions>] [ORDER BY <expressions>] [LIMIT <number>]
WITH <expression> AS <name>
SELECT <expressions>

The Query API also accepts top-level EXPLAIN and DESCRIBE statements. See their references for examples.

Examples

Return a scalar value.

SELECT 1 AS value

Use a common table expression.

WITH 1 AS value SELECT value

SHOW statements are not accepted by the Query API.

SHOW TABLES