TYPEOF (TSQL Function)
Returns the datatype of the argument as string.
Syntax
TYPEOF ( expression )
Arguments
- expression
- is an expression of any type.
Return Types
Returns varchar
.
Remarks
This function doesn’t exist in MS SQL Server.
Examples
PRINT TYPEOF(1234);
PRINT TYPEOF(55.6);
PRINT TYPEOF(1234 * 55.6);
The result is:
INT
NUMERIC(3, 1)
NUMERIC(14, 1)