mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
1.6 KiB
1.6 KiB
slug | sidebar_position | sidebar_label |
---|---|---|
/en/sql-reference/functions/ulid-functions | 54 | ULID |
Functions for Working with ULID
generateULID
Generates the ULID.
Syntax
generateULID([x])
Arguments
x
— Expression resulting in any of the supported data types. The resulting value is discarded, but the expression itself if used for bypassing common subexpression elimination if the function is called multiple times in one query. Optional parameter.
Returned value
The FixedString type value.
Usage example
SELECT generateULID()
┌─generateULID()─────────────┐
│ 01GNB2S2FGN2P93QPXDNB4EN2R │
└────────────────────────────┘
Usage example if it is needed to generate multiple values in one row
SELECT generateULID(1), generateULID(2)
┌─generateULID(1)────────────┬─generateULID(2)────────────┐
│ 01GNB2SGG4RHKVNT9ZGA4FFMNP │ 01GNB2SGG4V0HMQVH4VBVPSSRB │
└────────────────────────────┴────────────────────────────┘