title: Adding a foreign key to my table in SQL
body: <p>I am having an issue</p>
  
  <pre><code>create table REALESTATE (
  reale_id        integer,
  agents_id       integer not null,
  listing_id      integer not null,
  primary key (reale_id)
  );
  </code></pre>
  
  <p>*<strong><em>TABLE CREATED</em>*</strong></p>
  
  <pre><code>create table AGENTS (
   agents_id  integer,
  agents_name  char(10) not null,
  agents_lname char(20) not null,
  listing_id  integer,
  customer_id integer,
  reale_id    integer, 
  primary key (agents_id),
  foreign key (customer_id) references AGENT (customer_id),
  foreign key (reale_id) references REALESTATE (reale_id)
  );
  </code></pre>
  
  <p>ERROR at line 9:
  ORA-00942: table or view does not exist</p>
  
  <pre><code>create table CUSTOMER (
  customer_id     integer,
  customer_name   char(6) not null,
  customer_lname  char(15) not null,
  agents_id       integer,
  primary key (customer_id),
  foreign key (agents_id) references AGENTS (agents_id)
  );
  </code></pre>
  
  <p>ERROR at line 7: ORA-00942: table or view does not exist</p>