title: Self Incrementing Value In Oracle Query
body: <p>I'm new to Oracle DB...</p>
  
  <p>I have a table consisting of 2 fields, YEAR and MAINT_CODE. </p>
  
  <p>I have to write a report query which will render the following in a report:</p>
  
  <pre><code> ACTION  | YEAR | MAINT_CODE
  --------------------------
  Action 1 | 2012 | 0123
  Action 2 | 2012 | 0122
  Action 3 | 2013 | 0122
  </code></pre>
  
  <p>Now, I do not have an Action field, this number after Action must just increment.
  I cannot alter the table at all.</p>
  
  <p>My current query looks like this:</p>
  
  <pre><code>SELECT YEAR, MAINT_CODE
  FROM mytable
  </code></pre>
  
  <p>How can I get that incrementing value after the Action?
  I'm not even sure where to look - I've looked into sequencing but I'm not sure that's what I need here. Any ideas?</p>