INTERVALDTS_CMP¶
说明¶
比较两个INTERVALDTS值, 第一个大返回1,相等返回0,第一个小返回-1
返回值¶
1,-1,0
示例¶
示例1: 比较两个INTERVALDTS值
-- 比较两个INTERVALDTS值
SELECT INTERVALDTS_CMP(to_timestamp('2017 06 23 21:23:34','yyyy-mm-dd hh24:mi:ss') - to_timestamp('2017 05 23 21:23:34','yyyy-mm-dd hh24:mi:ss'), to_timestamp('2017 06 23 21:23:34','yyyy-mm-dd hh24:mi:ss') - to_timestamp('2017 05 24 21:23:34','yyyy-mm-dd hh24:mi:ss'));
INTERVALDTS_CMP(int) |
--------------------------
1 |
总数目:1