title: H2 and FOREIGN KEY
body: <p>I ran into a problem:</p>
  
  <p>I was going to create 2 tables in H2. When I tried to create the second table, an error occured:</p>
  
  <blockquote>
    <p>column C_TASK not found</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>CREATE TABLE S_TASK (C_TASK INT PRIMARY KEY, N_TASK VARCHAR(255), POINT_COUNT INT);
  
  CREATE TABLE S_ACHIEVEMENT(C_ACHIEVEMENT INT PRIMARY KEY, N_REWARD VARCHAR(255), PICTURE VARCHAR(255), FOREIGN KEY (C_TASK) REFERENCES S_TASK(C_TASK), EXEC_COUNT INT);
  </code></pre>