µ±È»²»ÄÜд¾ßÌåʱ¼ä£¬ÒòΪÿ´ÎÎÒ¶¼²éÕâÖÖÊý¾Ýselect * from tablename where create_time>= trunc(SYSDATE-1) and create_time <trunc(SYSDATE ) select * from tablename where create_time> trunc(SYSDATE-1)+ 8/24 and create_time < trunc(SYSDATE) + 8/24 select * from tablename where create_time>to_date('20090103 00:00:00','yyyymmdd hh24:mi:ss') and create_time <to_date(20090104 00:00:00','yyyymmdd hh24:mi:ss')
ÏÖÔÚÓÐÒ»ORACLEÖеÄSQLÓï¾ä£¬ÐèÒªÒÆÖ²µ½DB2ÖУ¬ÇëÎʸÃSQL¸ÄÈçºÎд ORACLEÖУº select floor(months_between(date1,date2)) from A date1,date2·Ö±ðΪ±íÖеÄÁ½¸ö×ֶΠ£¬¶¼ÎªÈÕÆÚÐÍ DB2ÖÐÈçºÎʹÓÃÐ ......