title: SQL : How to Delete Rows; when defending “WHERE” from another table with Multiply Returns
body: <h2>Query</h2>
  
  <pre><code>    DELETE FROM TEMPSchedules 
             WHERE StudentID = ( Select StudentID 
                                 From Students 
                                 Where Ref = 'H1007')
  </code></pre>
  
  <h2>Error Message</h2>
  
  <blockquote>
    <p>Subquery returned more than 1 value. This is not permitted when the
    subquery follows =, !=, &lt;, &lt;= , >, >= or when the subquery is used as
    an expression.</p>
  </blockquote>
  
  <h2>Problem</h2>
  
  <p>Now the problem is that each “Ref Group” has more than 1 Student attached to it. So how should I deal with this.
  Thanks</p>