Summer Deals - hours only!Up to 80% off on all courses and bundles.-Close
Reviewing SQL and numbers
So you think you can count
Round and other functions
20. Function trunc() – practice
Review and practice

Instruction

Good. The last, but not the least, function to practice is trunc(x). It always rounds towards zero.

Exercise

Show the character's name together with its stat_modifier, followed by the stat_modifier rounded with the function trunc(x,p) to a single decimal place. Name the last column trunc. Observe how it behaves for positive and negative numbers.

Stuck? Here's a hint!

Use trunc(stat_modifier, 1).