TIMESTAMP_TO_SCN
Syntax
TIMESTAMP_TO_SCN(timestamp)
Description
The TIMESTAMP_TO_SCN() function takes a timestamp as input and returns the corresponding System Change Number (SCN). The input parameter is of the DATETIME type, and the returned value is of the UINT64_T type.
Examples
SELECT TIMESTAMP_TO_SCN("2023-02-21 00:00:01");
+-----------------------------------------+
| timestamp_to_scn("2023-02-21 00:00:01") |
+-----------------------------------------+
| 1676908801000000000 |
+-----------------------------------------+
1 row in set (0.001 sec)