Rounding numbers
Sometimes, you only care about the whole dollar amount and want to ignore the decimal values of the cost. In this exercise, you will round the cost to the nearest dollar.
This exercise is part of the course
Intermediate SQL Server
Exercise instructions
Write a SQL query to round the values in the Cost
column to the nearest whole number.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- Round Cost to the nearest dollar
SELECT Cost,
___ AS RoundedCost
FROM Shipments