oracle中between and包含边界值,也就是所谓的闭区间。

如 between 1 and 100,则表示包含1和100及以内的一切数值。

如以下语句:

1
2
3
4
5
6
7
8
9
10
11
12
13
select name,
       score,
       case
         when score >= 90 then
          '优秀'
         when score between 70 and 89 then
          '良好'
         when score between 60 and 69 then
          '及格'
         when score < 60 then
          '不及格'
       end 等级
  from test;

则代表:90分及以上为优秀,70分-89分为良好,60-69分为及格,60分以下为不及格。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-04-10
相关资源
相似解决方案