date2005-3-11
2005-02-11
.
.
. 数据库里有这两种格式的数据.我想查出大于等于2005年2月份的数据怎么查.我试了一下.date>='2005-02' 和date>='2005-2'查出来的不一样.谢谢.
2005-02-11
.
.
. 数据库里有这两种格式的数据.我想查出大于等于2005年2月份的数据怎么查.我试了一下.date>='2005-02' 和date>='2005-2'查出来的不一样.谢谢.
select * from table where optdate>sysdate-100
WHERE
date > '2005' and substr(date,1,4)='2005'
and to_number(substr(date,instr(date,'-')+1,instr(date,'-',-1)-instr(date,'-')-1)) >= 2