Table function
NULL values remain NULL; missing cells in the final row are padded with NULL.
Syntax
Table
Arguments
Returns
- Type: TABLE with ceil(number of values / rows) columns
- NULL behavior: NULL values remain NULL; missing cells in the final row are padded with NULL.
- Empty input: At least one value is required; unused cells in the final generated row are NULL.
- Shape: rows generated rows per input row; column count is ceil(number of supplied values / rows).
- Ordering: Values are placed row-major; SQL row order requires ORDER BY.
Properties
Usage notes
- INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.
- Deterministic: The same inputs and settings produce the same result.
Examples
Typical behavior
Arrange values into rows
Limitations
- Values in the same output column must have the same type after conversion.
- rows must be a positive literal; at least one value is required.
Last modified on October 15, 2026