Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Unanswered: extra info returned

    I entered:

    SELECT Name
    FROM STUDENT AS ST, COURSE AS C, SECTION AS SE, GRADE_REPORT AS G
    WHERE ST.Student_number=G.Student_number AND
    G.Section_identifier=SE.Section_identifier AND
    Instructor='Anderson'

    and am expecting to get back two names, but I get four of each name. I do not know why I don't get one of each since each person is taking the instructor Anderson only once.

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Remove your COURSE table from the FROM part of your query as you are not referencing it in the WHERE clause.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •