I shot a training video today while I was answering a SQL Join question on Yahoo Answers.
During the video, I construct the database, tables, and example data.
Then I tried to run the current query to see what error I get. Finally, I work through the issue and fix the join.
Here is the video:
If you couldn’t see the question well in the video, here is a reprint.
|
My answer is to put in the inner join condition.
Here is the final query:
SELECT STUDENT.S_ID, S_LNAME, S_FNAME, S_ADDRESS, S_CITY, S_STATE, S_ZIPCODE, S_PHONE FROM STUDENT inner join GPA on STUDENT.S_ID=GPA.S_ID WHERE GPA.G_CLASS = 4 ORDER BY S_LNAME, S_FNAME;
I am attaching the script to create and populate the tables and the Microsoft Excel file so you can see how I create my INSERT statements.
Let me know if you have any questions or comments by posting them below.