title: How can I check which column is wrong in the insert statement?
body: <p>I created a database and want to fill it with data using Java, but this table gives me some difficulties.</p>
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE doctor (
      id INTEGER,
      employeeID CHAR(10) CONSTRAINT doctor_uk UNIQUE,
      specialisation VARCHAR(255),
      drugcertificate INTEGER DEFAULT 0,
      CONSTRAINT docotr_pk PRIMARY KEY (id),
      CONSTRAINT doctor_fk FOREIGN KEY (employeeID) REFERENCES employee
          ON DELETE CASCADE,
      CONSTRAINT doctor_drugcert_check CHECK (drugcertificate Between 0 AND 1 )
  );  
  </code></pre>
  <p>I created the table with no problems whatsoever, and I am able to fill it with data using oracle sql developer.
  But when I try to run this Java code I get the error msg:</p>
  <blockquote>
  <p>ORA-00984: Column Not Allowed Here</p>
  </blockquote>
  <p>And in the Java file, before that loop is another loop which fills another table and that works just fine. So it is just this for loop that doesn't work.</p>
  <pre class="lang-java prettyprint-override"><code>for(int amount = 0; amount &lt; 10; ++amount) {
            int drugcertificate = (random.nextDouble() &gt;= 0.5? 1 : 0);
            String insertDocotr = &quot;INSERT INTO doctor(doctorId, employeeId, specialisation, drugcertificate) VALUES (&quot;+(amount+1)+&quot;, &quot;+
                                          employeeIDs.get(amount)+&quot;, &quot;+doctorSpecial[amount%4]+&quot;, &quot;+drugcertificate+&quot;)&quot;;
  
            int rowsAffected = stmt.executeUpdate(insertDoctor);
        }
  </code></pre>
  <p>employeeIDs is a List with a few type Long numbers and
  doctorSpecial is an Array of Strings.</p>
  <p>What should I change? I don't get it.</p>