ALTER FUNCTION [dbo].[保留2位四舍五入]
( @number float)
RETURNS varchar(50)
begin
declare @num varchar(50)
IF
round(@NUMBER,0)=@NUMBER
begin set @num=cast(round(@number,0) as varchar(10))
end
else begin set @num= cast(round(@number,2) as varchar(10)) end
return @num
end