MySQL Forums
Forum List  »  Newbie

Query Help
Posted by: Marc Weymouth
Date: November 24, 2017 11:01AM

Hi Everyone am very new to SQL and self teaching myself until I can take a SQL class hopefully this spring. Came across this example and having been trying to figure it out.

I've made two tables.
The first table (X) has columns X1 and X2.
The second table (Y) has columns X and D.
Both X1 and X2 have a foreign key constraint referring to column X in table Y.
Write a query to determine all X1,X2 such that X1 and X2 have different values for D.

I've got the two tables but am not sure how to write the query. Any help will be appreciated.

Options: ReplyQuote


Subject
Written By
Posted
Query Help
November 24, 2017 11:01AM
November 24, 2017 01:40PM
November 24, 2017 03:50PM


Sorry, only registered users may post in this forum.

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.