binary
function
Applies to: Databricks SQL Databricks Runtime
Casts the value of expr
to BINARY. This function is a synonym for CAST(expr AS BINARY)
. See cast function for details.
Syntax
binary(expr)
Arguments
expr
: Any expression that that can be cast to BINARY.
Returns
A BINARY.
Examples
> SELECT binary('Spark SQL');
[53 70 61 72 6B 20 53 51 4C]
> SELECT binary(1984);
[00 00 07 C0]
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for