FLOOR Function Examples | VantageCloud Lake - Examples: Using the FLOOR Function - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Example: Querying SELECT FLOOR (136E-1);

The following query returns the FLOAT value 13E0, because 13 is the largest integer that is less than the FLOAT value 13.6E0.

SELECT FLOOR (136E-1);

Example: Querying SELECT FLOOR(-6.5);

The following query returns a DECIMAL value of -7.0 because -7 is the largest integer that is less than the DECIMAL literal -6.5.

SELECT FLOOR(-6.5);

Example: Querying SELECT FLOOR (CAST(-6.5 AS DECIMAL(2,1)));

The following query returns a value of -7.0 with a data type of DECIMAL(3,1), because -7 is the largest integer less than DECIMAL -6.5. The precision of the return value is increased by 1.

SELECT FLOOR (CAST(-6.5 AS DECIMAL(2,1)));