日期取年.月.日 select id, phone,time,year(time),month(time), DAY(time),TIME(time) from user where phone='xx' #分别取年.月.日.时间select id, phone,time,year(time) from user where phone='xxxxxx' #取年 select id, phone,time,month(time) from user where phone='xxxxxx' #取
oracle sql日期比较:在今天之前: select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') 在今天只后: select * from up_date where update &