string
function
Applies to: Databricks SQL Databricks Runtime
Casts the value expr
to STRING
. This function is a synonym for cast(expr AS STRING)
. See cast function for details.
Syntax
string(expr)
Arguments
expr
: An expression that can be cast toSTRING
.
Returns
The result matches the type of expr
.
Examples
> SELECT string(5);
5
> SELECT string(current_date);
2021-04-01