Instruction
Great job!
There are also other rounding functions you can use:
CEILING(x)returns the ceiling ofx, which is the smallest integer greater than or equal tox. In other words, it always rounds up (the ceiling of13.7is14, and so is13.1, but the ceiling of13is just13). The result ofCEILING(-5.4)is-5.FLOOR(x)is the opposite ofCEILING(x)—it returns the greatest integer less than or equal tox(i.e., it always roundsxdown). So the floor of13.7is13, and so is13.1. But the floor of13is just13. The result ofFLOOR(-5.4)is-6.
Now you really understand that T-SQL offers various approaches to rounding!
Exercise
Let's do some rounding. Show the character's name and actual weight, followed by the weight rounded up. Name the column UpWeight.
Stuck? Here's a hint!
Use CEILING(Weight).



