Id XueHao Name Mark
1 00001 ZhangSan 85
2 00002 LiSi 75
等级表:
Id MarkFrom MarkTo Level
1 90 100 A
2 80 89 B
3 70 79 C 作者: Carter 时间: 2014-11-9 15:13
设计表还可以,没制作过报表,无能为力作者: SanYong 时间: 2014-11-15 14:49
SELECT XueHao,NAME,
CASE
WHEN Mark>=90 THEN 'A'
WHEN Mark BETWEEN 80 AND 89 THEN 'B'
WHEN Mark BETWEEN 70 AND 79 THEN 'C'
WHEN Mark BETWEEN 60 AND 69 THEN 'D'
ELSE 'E'
END
FROM student;