Single



Single is a built-in schema in the root of every database. It contains exactly one document, so selecting from it returns exactly one row. Use it to evaluate expressions and functions that don't need any data, much like DUAL in other databases.

round-pushpin Evaluates constant expressions.
SELECT
    10 + 10 as Twenty,
    Sha1('Hello') as Hash,
    DateTimeUTC('yyyy-MM-dd') as Today
FROM
    Single




Home
The home page
SQL :: Declare
Declares a variable for the rest of a script.
SQL :: Distinct
Removes duplicate rows from the results of a SELECT.
SQL :: Expressions
Literals, operators, comments and variables in KBSQL.
SQL :: Keywords
A breakdown of all of the statements and keywords supported by the query processor.
SQL :: Scalar Functions
Scalar functions are evaluated once per row.
SQL :: Select
Select statements are used to read (or query) data from the database.
SQL :: Select Into
Creates a schema and fills it with the results of a SELECT.
SQL :: Syntax
Basic KBSQL syntax and some examples.
SQL :: Where
The where clause filters the documents read, updated or deleted by a statement.