Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

DECIMAL_SCALE function

Focus mode
DECIMAL_SCALE function - Amazon Redshift

Checks the number of decimal digits to be stored to the right of the decimal point. The range of the scale is from 0 to the precision point, with a default of 0.

Syntax

DECIMAL_SCALE(super_expression)

Arguments

super_expression

A SUPER expression or column.

Return type

INTEGER

Examples

To apply the DECIMAL_SCALE function to the table t, use the following example.

CREATE TABLE t(s SUPER); INSERT INTO t VALUES (3.14159); SELECT DECIMAL_SCALE(s) FROM t; +---------------+ | decimal_scale | +---------------+ | 5 | +---------------+

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.