Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, William.
Asked: October 03, 2018 - 5:46 pm UTC
Last updated: October 04, 2018 - 10:36 am UTC
Version: 12c
Viewed 10K+ times! This question is
create table t ( c1 date ); insert into t with rws as ( select date'2018-09-30' + level c1 from dual connect by level <= 10 ) select c1 from rws; commit; var dt varchar2(10); exec :dt := '2018-10-07'; select * from t where c1 >= to_date ( :dt, 'YYYY-MM-DD' ); C1 07-OCT-2018 00:00:00 08-OCT-2018 00:00:00 09-OCT-2018 00:00:00 10-OCT-2018 00:00:00
declare dt date := date'2018-10-07'; begin for rws in ( select * from t where c1 >= dt ) loop dbms_output.put_line ( to_char ( rws.c1, 'YYYY-MM-DD' ) ); end loop; end; / 2018-10-07 2018-10-08 2018-10-09 2018-10-10
Scott Hutchinson, October 15, 2025 - 11:43 pm UTC
The Oracle documentation contains a complete SQL reference.