CAST
CAST
is used to convert an expression of one data type to another.
Syntax
CAST (expression AS data_type)
Parameters
- expression: the expression to be converted.
- data_type: the data type to convert the expression to.
Examples
Convert a string to an integer:
SELECT CAST('123' AS INT) ;
+-------------+
| Utf8("123") |
+-------------+
| 123 |
+-------------+
当前内容版权归 GreptimeDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 GreptimeDB .