title: Oracle get all dates in a month
body: <p>I am trying to write an SQL statement that would allow me to retrieve all the orders created in the month of September without much luck.</p>
  
  <p>Not working:</p>
  
  <pre><code>select order_number, created_date
  from orders
  where created_date in to_date('2012-09', 'YYYY-MM');
  </code></pre>
  
  <p>Working but too long:</p>
  
  <pre><code>select order_number, created_date
  from orders
  where trunc(created_date) between to_date('2012-09-01', 'YYYY-MM-DD') and to_date('2012-09-30', 'YYYY-MM-DD');
  </code></pre>