3.sql SELECT levelName ,
CASE WHEN NeedPoints < 100 THEN N'等级一'
WHEN NeedPoints >= 100
AND NeedPoints < 200 THEN N'等级二'
ELSE N'等级三'
END '等级'
FROM dbo.level
作者: 马晓凤 时间: 2013-7-12 18:16
declare @x int
set @x=150
SELECT
CASE WHEN @a <100 then '新手'
WHEN @a >=100 AND @a < 200 THEN '等级一'
WHEN @a >= 200
AND @a < 300 THEN '等级二'
ELSE '等级三'
END