Skip to main content

Categories: Datatype

TYPEOF

Reports the type (in string format) of the input expression.

Syntax

TYPEOF(input any) → varchar

  • input: An expression for which the type is returned.

Examples

TYPEOF example
SELECT TYPEOF(TRUE)
-- BIT
TYPEOF example
SELECT TYPEOF(100)
-- INT
TYPEOF example
SELECT TYPEOF(98.76)
-- DECIMAL
TYPEOF example
SELECT TYPEOF('2021-09-14')
-- VARCHAR