title: How to insert data into tables that have foreign keys
body: <pre><code>SQL&gt; desc invoices
   Name                                      Null?    Type
   ----------------------------------------- -------- ----------------------------
  
   INVOICE_ID                                NOT NULL NUMBER(6)
   COMPANY_ID                                         NUMBER(6)
   STUDENT_ID                                         NUMBER(6)
   BILLING_DATE                                       DATE
  
  SQL&gt;
  </code></pre>
  
  <p>I would like to insert some sample data into this table. The <code>company_id</code> and <code>student_id</code> are foreign keys. This is what I'am entering:</p>
  
  <p><code>INSERT INTO invoices
  VALUES (SEQ_INVOICE.NEXTVAL,[what1],[what2],SYSDATE);</code></p>
  
  <p>I don't know what I am supposed to put in the what1 and what2</p>
  
  <pre><code>SQL&gt; desc companies
   Name                                      Null?    Type
   ----------------------------------------- -------- ----------------------------
  
   COMPANY_ID                                NOT NULL NUMBER(6)
   COMPANY_NAME                                       VARCHAR2(30)
   ADDRESS                                            VARCHAR2(128)
   CONTACT_NO                                         VARCHAR2(11)
   NO_OF_EMP                                          NUMBER(10)
  
  SQL&gt;
  
  SQL&gt; desc students
   Name                                      Null?    Type
   ----------------------------------------- -------- ----------------------------
  
   STUDENT_ID                                NOT NULL NUMBER(6)
   ST_FNAME                                           VARCHAR2(16)
   ST_SNAME                                           VARCHAR2(16)
   ADDRESS                                            VARCHAR2(128)
   DOB                                                DATE
  
  SQL&gt;
  </code></pre>