title: Does Oracle allow an ORDER BY within an IN clause?
body: <p>Oracle is giving me an error (ORA-00907: missing right parenthesis) when I run this query:</p>
  
  <pre><code>select * 
  from reason_for_appointment 
  where reason_for_appointment_id in 
  (
      select reason_for_appointment_id 
      from appointment_reason 
      where appointment_id = 11 
      order by appointment_reason_id
  )
  </code></pre>
  
  <p>However, when I run just the subquery, there's no error.</p>
  
  <p>Can anyone explain what the problem is?</p>