Examples

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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);