Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Applies to:
Databricks SQL
Databricks Runtime
Casts the value expr to the target data type type. This operator is a synonym for cast function.
Syntax
expr :: type
Arguments
expr: Any castable expression.
Returns
The result is type type.
This operator raises the same errors as cast function. Use ?:: (question double colon sign) operator to return NULL on error instead.
Common error conditions
Examples
> SELECT '20'::INTEGER;
20
> SELECT typeof(NULL::STRING);
string
> SELECT 'abc'::INT;
Error: CAST_INVALID_INPUT