随笔分类 -  Oracle

摘要:select trunc(20171106/100,0) from tabledate 结果为201711select trunc(20171106/10000,0)*100 from tabledate 结果为201700两个值相减就是月份了,两表对比查询时,20171106 可以用字段替换,如: 阅读全文
posted @ 2020-09-16 19:28 七亿星空 阅读(253) 评论(0) 推荐(0)
摘要:NVL为了返回一个非 null 值。语法 NVL(A, B) 例子:nvl(a.age,0.0),如果a表的age值是null,就返回0.0 阅读全文
posted @ 2020-05-26 13:14 七亿星空 阅读(1398) 评论(0) 推荐(0)