title: Msg 4145 SQL Server An expression of non-boolean type specified in a context where a condition is expected,near 'END'
body: <p>I dont know why it's giving me this Error, cant find anything</p>
  
  <p>This is my code</p>
  
  <pre><code>@cid int,
  @sid char(9)
  AS
  
  BEGIN
  
  update StudentCourses
  SET mode=0
  where(select CourseId,StudentId from StudentCourses where CourseId=@cid 
  and StudentId=(Select PkId from Students where ID=@sid))
  
  END
  GO
  </code></pre>