SQL> select b1,b3,b4 from b;B1 B3 B4 ---------- --------- ----------- A 10 2005-5-4 B 30 2005-6-4 C 20 2005-7-4 D 50 2005-6-1Executed in 0.015 secondsSQL> select b1,b3,b4 from b where b4 >= to_date('20050601','yyyymmdd') and b4 < to_date('20050701','yyyymmdd');B1 B3 B4 ---------- --------- ----------- B 30 2005-6-4 D 50 2005-6-1Executed in 0.015 secondsSQL>
select * from table where to_date(colnum 'yyyy-mm-dd') between '2005-06-01' and '2005-07-01';
---------- --------- -----------
A 10 2005-5-4
B 30 2005-6-4
C 20 2005-7-4
D 50 2005-6-1Executed in 0.015 secondsSQL> select b1,b3,b4 from b where b4 >= to_date('20050601','yyyymmdd') and b4 < to_date('20050701','yyyymmdd');B1 B3 B4
---------- --------- -----------
B 30 2005-6-4
D 50 2005-6-1Executed in 0.015 secondsSQL>
where to_date(colnum 'yyyy-mm-dd') between '2005-06-01' and '2005-07-01';