SELECT ROUND(100.1145,2)
SELECT ROUND(100.1145,3)
GO
SELECT ROUND(123.45,-3), ROUND(123.45,-2), ROUND(123.45,-1), ROUND(123.45,0), ROUND(123.45,1), ROUND(123.45,2)
GO
SELECT FLOOR(123.45), FLOOR(-123.45), FLOOR($123.45), FLOOR($-123.45), FLOOR(123.9)
GO
SELECT CEILING(123.45), CEILING(-123.45), CEILING($123.45), CEILING($-123.45), CEILING(123.1)
GO
DECLARE @m MONEY
SET @m = 120.155 --SELECT @m = 120.155
SELECT @m
SELECT CONVERT(VARCHAR,@m)
GO
SELECT ROUND(100.1145,3)
GO
SELECT ROUND(123.45,-3), ROUND(123.45,-2), ROUND(123.45,-1), ROUND(123.45,0), ROUND(123.45,1), ROUND(123.45,2)
GO
SELECT FLOOR(123.45), FLOOR(-123.45), FLOOR($123.45), FLOOR($-123.45), FLOOR(123.9)
GO
SELECT CEILING(123.45), CEILING(-123.45), CEILING($123.45), CEILING($-123.45), CEILING(123.1)
GO
DECLARE @m MONEY
SET @m = 120.155 --SELECT @m = 120.155
SELECT @m
SELECT CONVERT(VARCHAR,@m)
GO
No comments:
Post a Comment