|The Message text:
This email was created by [your name] who thought you would be interested in the following Article:
"Best Practices to tune up T-SQL and SP"
I can't imagine that a correlated subquery is your best answer here:SELECT name FROM teacher WHERE EXISTS (SELECT 1 FROM student WHERE teacher.teacher_id = student.teacher_id)Instead, how about an INNER JOIN?SELECT DISTINCT teacher.nameFROM teacher INNER JOIN student ...
CodeProject also contains hundreds of articles, free source code samples and applications to help in your day to day programming. Why not give it a try!