On this page

    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

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