title: update or delete on table "employee" violates foreign key constraint
body: <p>I have an <code>employee</code> table with the following columns:</p>
  
  <pre><code>fname (varchar), lname (varchar), id (numeric)  
  </code></pre>
  
  <p><code>id</code> is the primary key.</p>
  
  <p>There is a table name called <code>works_on</code> with columns </p>
  
  <pre><code>projectname (varchar), id (numeric)  
  </code></pre>
  
  <p>Here, <code>id</code> is a foreign key that references the <code>employee</code> table.</p>
  
  <p>When I was trying delete a row from the <code>employee</code> table like this:</p>
  
  <pre><code>delete from employee where id = 1
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>update or delete on table "employee" violates foreign key constraint "works_on_id_fkey" on table "works_on"`.</p>
  </blockquote>
  
  <p>I am new to the database management system. </p>
  
  <p>Any solution?</p>