<choose>
<when test="scoreRange!=null and scoreRange eq 1">
AND sc.score <![CDATA[ < ]]> 60
</when>
<when test="scoreRange!=null and scoreRange eq 2">
AND (sc.score <![CDATA[ >= ]]> 60 AND sc.score <![CDATA[ <= ]]> 70 )
</when>
<when test="scoreRange!=null and scoreRange eq 3">
AND (sc.score <![CDATA[ >= ]]> 70 AND sc.score <![CDATA[ <= ]]> 80 )
</when>
<when test="scoreRange!=null and scoreRange eq 4">
AND (sc.score <![CDATA[ >= ]]> 80 AND sc.score <![CDATA[ <= ]]> 90 )
</when>
<when test="scoreRange!=null and scoreRange eq 5">
AND sc.score <![CDATA[ > ]]> 90
</when>
<otherwise>
</otherwise>
</choose>

MyBatis中choose when正确写法的更多相关文章

  1. mybatis中大于等于小于的写法

    第一种写法(1): 原符号 < <= > >= & ' "替换符号 < <= > >= & &apos; " ...

  2. mybatis中大于等于小于等于的写法

    标准写法如下: 第一种写法(1): 原符号 < <= > >= & ' "替换符号 < <= > >= & &apos ...

  3. 在mybatis中模糊查询有三种写法

    <select id="selectStudentsByName" resultType="Student"> <!--第一种-->  ...

  4. Mybatis中的 >= <= 与 sql写法区别

  5. 【新】mybatis中大于等于小于等于的两种常用写法

    mybatis中大于等于小于等于的写法 原符号 < <= > >= & ' " 替换符号 < <= > >= & &a ...

  6. Mybatis中Like 的使用方式以及一些注意点

    做一个积极的人 编码.改bug.提升自己 我有一个乐园,面向编程,春暖花开! 模糊查询在项目中还是经常使用的,本文就简单整理Mybatis中使用Like进行模糊查询的几种写法以及一些常见的问题. 使用 ...

  7. C++中虚继承派生类构造函数的正确写法

    最近工作中某个软件功能出现了退化,追查下来发现是一个类的成员变量没有被正确的初始化.这个问题与C++存在虚继承的情况下派生类构造函数的写法有关.在此说明一下错误发生的原因,希望对更多的人有帮助. 我们 ...

  8. mybatis中Oracle分页语句的写法

    最近一段时间使用oracle数据库查询分页, 用的是springboot. Oracle数据库中没有像mysql中limit的写法, 只能换其他方式写. 考虑到oracle中的ROWNUM变量, 使用 ...

  9. MyBatis中大于和小于号的转义写法

    mybatis 中 SQL 写在mapper.xml文件中,而xml解析 < .>.<=.>= 时会出错,这时应该使用转义写法. 方式一 < <= > > ...

随机推荐

  1. ListView中的Item点击事件和子控件的冲突或者item点击没有反应的解决的方法

    fragment中加入了button和checkbox这些控件.此时这些子控件会将焦点获取到.所以经常当点击item时变化的是子控件.item本身的点击没有响应. 这时候就能够使用descendant ...

  2. angularjs入门初体验

    1. http://www.zouyesheng.com/angular.html#toc39

  3. 分库分表利器——sharding-sphere

    背景 得不到的东西让你彻夜难眠,没有尝试过的技术让我跃跃欲试. 本着杀鸡焉用牛刀的准则,我们倡导够用就行,不跟风,不盲从. 所以,结果就是我们一直没有真正使用分库分表.曾经好几次,感觉没有分库分表(起 ...

  4. 谈谈MySQL的do语句

    [select在某些场景下的不足] 比如说我们想让MySQL暂停5秒.那么可以这样写 ); +----------+ ) | +----------+ | +----------+ row in se ...

  5. Linux系统命令缩写

    命令缩写:(转) ls:list(列出目录内容) cd:Change Directory(改变目录) su:switch user 切换用户 rpm:redhat package manager 红帽 ...

  6. Android Studio 插件(plugins)或者intellij idea 插件(plugins)无法安装

    通常这种情况出现都因为idea.properties修改了 idea.system.path=${指定路径}/system idea.plugins.path=${idea.config.path}/ ...

  7. FAL_CLIENT和FAL_SERVER参数详解

    FAL_CLIENT和FAL_SERVER参数详解 转载:http://openwares.net/database/fal_client_fal_server.html FAL_CLIENT和FAL ...

  8. TI am335x am437x PRU

    http://bbs.eeworld.com.cn/thread-355798-1-1.html

  9. hdoj:2023

    #include <iostream> #include <string> #include <vector> ][],b[],c[]; using namespa ...

  10. Ubuntu 14.04 下搭建SVN服务器 (转载自 http://www.linuxidc.com/Linux/2015-01/111956.htm)-------------我所用到是红色字体

    http://www.linuxidc.com/Linux/2015-01/111956.htm Ubuntu 14.04 下搭建SVN服务器 svn:// 安装软件包: sudo apt-get i ...