MySQL Forums
Forum List  »  Newbie

Simple SQL Query
Posted by: Subhash S
Date: September 08, 2004 07:42AM

Hello,
I have a table as shown below. I need to write a sql query that tells
me what courses are common between Tom and Jim. Database is MySQL.

Name CourseID
-------------
Tom 1
Tom 2
Tom 3
Jim 1
Jim 3
Jim 4


Output needs to something like:

CourseID
--------
1
3

Appreciate all your help.
Thanks, Subhash

Options: ReplyQuote


Subject
Written By
Posted
Simple SQL Query
September 08, 2004 07:42AM
September 08, 2004 10:27AM
September 09, 2004 07:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.