ceiling
ceiling( expr )
Converts a float to the smallest integer value that is bigger than or equal to a number. The expression ceiling(1.7)
results in 2
.
table new_table is select
ceiling(my_float_column) as my_integer_column,
from original_table;
floor
floor( expr )
Converts a float to the smallest integer value that is smaller than or equal to a number. The expression floor(1.7)
results in 1
.
table new_table is select
floor(my_float_column) as my_integer_column,
from original_table;
round
Converts a float to the closest integer number. The expression round(1.5)
results in 2
. The expression round(1.4)
results in 1
.
table new_table is select
round(my_float_column) as my_integer_column,
from original_table;