ROUND Function Examples | Teradata Vantage - Examples - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢

Example 1: Query Returns with Result 32.4000

The following query returns the result 32.4000.

   SELECT ROUND(32.4467, 1);

Example 2: Query Returns with Result 32.4600

The following query returns the result 32.4600.

   SELECT ROUND(32.4567, 2);

Example 3: Query Returns with Result 100.0000

The following query returns the result 100.0000.

   SELECT ROUND(99.9999, 3);

Example 4: Query Returns with Result 30.0000

The following query returns the result 30.0000.

   SELECT ROUND(32.4567, -1);

Example 5: Query Returns with Result 100.0000

The following query returns the result 100.0000.

   SELECT ROUND(55.4567, -2);

Example 6: Query Returns with Result 0.0000

The following query returns the result 0.0000.

   SELECT ROUND(55.4567, -3);

Example 7: Query Returns with Result -5.00

The following query returns the result -5.00.

   SELECT ROUND(-5.35, 0);

Example 8: Query Returns with Result -6.00

The following query returns the result -6.00.

   SELECT ROUND(-5.55, 0);