I have the following SQL table:
A|B
---
w|x
x|w
y|z
z|y
Can I construct a query which will yield the following result:
A|B
---
w|x
y|z
To summarize, I would like to treat the two columns as an unordered set, such that (a,b) == (b,a).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The “best” code depends on the database, but following is dbms-agnostic: