ORD(expression)
Returns the ordinal value of <expression>.
This function is formally equivalent to a type cast to integer; it simply returns the binary value of <expression> without modification.
<expression> may be of any integer scalar type, enumerated, character or boolean.
The result type is of the smallest standard integer scalar type that can hold all values of the type of <expression>.