title: How to reference foreign key of another schema table while creating table?
body: <p>I have two Schemas :-</p>
  
  <ul>
  <li>GamersProfileDB  - Contain <code>UserCredential_tbl</code> table </li>
  <li>DeveloperDB      - Contain <code>PlayerAchievements_tbl</code> table</li>
  </ul>
  
  <p>Now while creating table called <code>PlayerAchievements_tbl</code> , i want to reference it from another schema table  <code>Usercredential_tbl</code>  . Here is the following sql query :-</p>
  
  <pre><code>create table PlayerAchievements_tbl 
  (
  pid number(10) references gamersprofiledb.usercredential (id),
  aid number(10) references achievements (id) 
  );
  </code></pre>
  
  <p>But the above query gave me <strong><em>'table or view does not exist'</em></strong> error</p>
  
  <p><a href="https://stackoverflow.com/questions/29155012/referencing-the-foreign-key-of-another-schema?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">This</a> (possible duplicate) answer adding foreign_key in ALTER operation whereas i want it to add foreign_key on CREATE TABLE operation and Moreover it also didn't specify what grants or privileges may require to  execute this query </p>
  
  <p>So my exact question would be :-</p>
  
  <p>1) could it be possible to reference another schema table into existing schema table while creating new table ?</p>
  
  <p>2) or do we need some privileges to execute this query ? </p>
  
  <p>Thanks in Advance.</p>