Skip to main content
Version: 0.0.1

TYPEOF

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

{{< codeheader "TYPEOF example" >}}

SELECT TYPEOF(TRUE)
-- BIT

{{< codeheader "TYPEOF example" >}}

SELECT TYPEOF(100)
-- INT

{{< codeheader "TYPEOF example" >}}

SELECT TYPEOF(98.76)
-- DECIMAL

{{< codeheader "TYPEOF example" >}}

SELECT TYPEOF('2021-09-14')
-- VARCHAR