title: How to write sql statement to newly added column with another table values?
body: <p>I have table called <code>subject</code> and I added a new column <code>stdCount</code>. </p>
  
  <p>There is another table called <code>enrollments</code> with columns <code>student_id</code>, <code>subject</code>, <code>year</code>, <code>marks</code>. Mainly this table records for each student which subjects he or she is enrolled in. </p>
  
  <p>Now I need to get the student count for each unit from the <code>enrollments</code> table and update the <code>subject</code> table's <code>stdCount</code> column. </p>
  
  <p>How can I do this ? </p>