title: Building an Oracle view with a sequence
body: <p>I'm trying to build a new Oracle view off of a table. The only difference between the two is that I want to add a new column with a unique ID. The IDs have to be unique, but does not need to be ordered.</p>
  
  <p>I tried to run a script like this: </p>
  
  <pre><code>CREATE VIEW &lt;VIEW_NAME&gt;
  (
  ID, VALUE1, VALUE2,...
  )
  AS
     SELECT SEQ1.NEXTVAL, VAL1, VAL2,... FROM &lt;TABLE&gt;
  </code></pre>
  
  <p>However, I'm running into errors. <a href="https://stackoverflow.com/questions/9778323/oracle-view-creation-with-a-database-generated-id-from-a-sequence-object">A previous post</a> mentions it's not really possible but didn't elaborate so I was hoping to get some clarity. Doing an INSERT doesn't seem useful because I'd have to populate all the other values too, at least from what I've been reading.</p>
  
  <p>Edit: IDs should be consistent every time I look at the view.</p>
  
  <p>Picture of error:</p>
  
  <p><a href="https://i.stack.imgur.com/yjeon.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yjeon.png" alt="enter image description here"></a></p>