What is the logic behind the trunc function?

3

What does trunc do right and what other utilities can this example take?

    
asked by anonymous 14.12.2017 / 15:23

1 answer

3

A TRUNC() just discards the decimal part and is left with only the whole part.

In this case it does not matter to see something like "2.75 years". With the function it would only be "2 years", which is debatable because it is more for 3 years than 2. Then the ROUND() might be more interesting.

    
14.12.2017 / 15:25