Update from Student set sname+'#' where courseid=(select courseid from student group by sname having count (course)>5)