IS_SMALLINT function - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025. If you would like to use Python UDFs, create the UDFs prior to that date. Existing Python UDFs will continue to function as normal. For more information, see the blog post .

IS_SMALLINT function

Checks whether a variable is a SMALLINT. The IS_SMALLINT function returns true for numbers of scale 0 in the 16-bit range. The function returns false for any other values, including null and floating point numbers.

Syntax

IS_SMALLINT(super_expression)

Arguments

super_expression

A SUPER expression or column.

Return

BOOLEAN

Examples

To check if 5 is a SMALLINT using the IS_SMALLINT function, use the following example.

CREATE TABLE t(s SUPER); INSERT INTO t VALUES (5); SELECT s, IS_SMALLINT(s) FROM t; +---+-------------+ | s | is_smallint | +---+-------------+ | 5 | true | +---+-------------+