title: ORA-00907: Missing Right Parenthesis On Creating Foreign Key Oracle 12c
body: <h2>I Want To Make a Table Which Include One Auto Generated Primary Key And Two Foreign Keys But I'm Facing This Error...</h2>
  
  <pre><code>create table answers
  ( id number generated by default on null as identity primary key
  , question_id number foreign key references questions(id)
  , user_id number foreign key references users(id)
  , answer varchar(1000)
  , post_date date);
  
  create table answers (id number generated by default on null as identity primary key, question_id number foreign key references questions(id), user_id number foreign key references users(id), answer varchar(1000), post_date date)
  </code></pre>
  
  <blockquote>
    <p>ERROR at line 1:
    ORA-00907: missing right parenthesis</p>
  </blockquote>
  
  <h2>Then, I tried this:</h2>
  
  <pre><code>create table answers
  ( id number generated by default on null as identity primary key
  , question_id number foreign key (question_id) references questions(id)
  , user_id number foreign key (user_id) references users(id)
  , answer varchar(1000)
  , post_date date );
  
  create table answers
  ( id number generated by default on null as identity primary key
  , question_id number foreign key (question_id) references questions(id)
  , user_id number foreign key (user_id) references users(id)
  , answer varchar(1000)
  , post_date date )
                                                                                                       *
  </code></pre>
  
  <blockquote>
    <p>ERROR at line 1:
    ORA-00907: missing right parenthesis</p>
  </blockquote>
  
  <h2>It is still Giving Same Error!</h2>
  
  <p>But, if I do it in two steps:</p>
  
  <pre><code>create table answers
  ( id number generated by default on null as identity primary key
  , question_id number not null
  , user_id number not null
  , answer varchar(1000)
  , post_date date );
  
  Table created.
  
  alter table answers
  add foreign key (question_id) references questions(id) add foreign key (user_id) references users(id);
  </code></pre>
  
  <blockquote>
    <p>Table altered.</p>
  </blockquote>
  
  <p>Can anyone please get me out of this?</p>