sql
秃头小能手
这个作者很懒,什么都没留下…
展开
-
oracle中将不同单位的数字按照大小排序怎么写sql
如图:思路是需要一列转换为统一单位的数据,然后根据大小排序--1.创建测试表create table tmp asselect '10年' bond_period from dual union allselect '2年' bond_period from dual union allselect '91日14' bond_period from dual union allselect '3年15' bond_period from dual union allselect '原创 2020-12-09 16:22:59 · 466 阅读 · 0 评论 -
mybatis include refid=“xxxx“的含义
select p.prov_id, p.pro_name, a.area_id, a.area_desc, to_number(p.ord2) pro_ord ,a.ord area_ord from dmcode_pub.dmcode_province p left join dmcode_pub.dmcode_area a on p.prov_id = a.prov_id wh原创 2020-12-08 20:59:50 · 1235 阅读 · 0 评论 -
xml文件中if,choose和where的作用
myBatis中是不支持if-else的,想要是用if-else的话,可以使用choose代替。choose,when,otherwise有点像Java中的switch.choose标签是按顺序判断其内部when标签中的test条件出否成立,如果有一个成立,则 choose 结束。当 choose 中所有 when 的条件都不满则时,则执行 otherwise 中的sql。类似于Java 的 switch 语句,choose 为 switch,when 为 case,otherwise 则为 defa.原创 2020-12-08 20:52:22 · 1659 阅读 · 0 评论 -
sql学习--order by与case when then
行云数据库的操作update修改某一列的数据原创 2020-12-08 11:27:58 · 3699 阅读 · 0 评论