select * from emp where to_char(hiredate,'yyyy-MM-dd hh:mm:ss')>='2013-1-2 19:00' and to_char(hiredate,'yyyy-MM-dd hh:mm:ss')<='2013-1-2 21:00' ;
其中hiredate是日期字段。
我不会写诗
2024-10-11 08:03:22
Select * from Tables where time >= to_date('2013-01-02 19:00:00','yyyy-mm-dd hh24:mi:ss') and time <= to_date('2013-01-02 21:00:00','yyyy-mm-dd hh24:mi:ss')
月光很浅思念很暖
2024-10-11 13:06:14
问题没说清楚,只能写成如下语句了。 select * from tab where rqsj between '2013-1-2 19:00' and '2013-1-2 21:00';