IS_DECIMAL 函数 - Amazon Redshift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

IS_DECIMAL 函数

检查某个值是否为 DECIMAL。对于非浮点的数字,IS_DECIMAL 函数返回 true。对于任何其他值,包括 null,该函数返回 false。

IS_DECIMAL 函数是 IS_BIGINT 的超集。

语法

IS_DECIMAL (super_expression)

Arguments

super_expression

SUPER 表达式或列。

返回值

布尔值

示例

以下查询显示了 IS_DECIMAL 函数。

CREATE TABLE t(s super); INSERT INTO t VALUES (1.22); SELECT s, is_decimal(s) FROM t; s | is_decimal ------+------------ 1.22 | True (1 row)