DB2 中日期 比较

在DB2中的Date 一共识别三种格式,最多见的是这样html

'2013-12-12'

  对,你没看错,DB2认为这样的字符串就是Date数据sql

而后咱们能够利用函数这样寻找日期区间函数

select * from users where g_time between '2003-05-04 ' and '2003-05-08'

也能够利用操做符来进行常规的日期大小比较htm

select * from users where g_time >= '2003-05-04 ' 

  这篇文档更加详细http://www.cnblogs.com/wanghonghu/archive/2012/05/25/2518604.htmlblog

相关文章
相关标签/搜索