34,590
社区成员
发帖
与我相关
我的任务
分享
DECLARE @i decimal(4,2)
SET @i=2.33
select @i-(@i-2)+1
/*
3.00
*/
DECLARE @i DECIMAL(4,2)
DECLARE @j INT
SET @i = 2.23
SELECT @j = CASE WHEN @i >0 THEN @i+1 ELSE @i END
PRINT @j
select ((2.23 + 0.99)*100 - (2.23 + 0.99)*100%100)/100
select (2.23 + 0.99)*100/100
select cast(2.23+0.99 as int)
/*
3
select cast(2.23+0.99 as int)
declare @xx float
set @xx = 2.23
declare @count int
set @count = 0
while (@xx - 1 > 0)
begin
set @count = @count + 1
set @xx = @xx - 1
end
set @count = @count + 1
select @count
/*
(无列名)
3
*/