Question

MySQL does not support the difference (except) operator in SQL-99 standard, but it is known that the difference operator can

Can someone explain this currently reviewing

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The except operator compares the result of 2 sets and returns distinct elements from set A that doesnot have matching element in B.

This can be done with selecting distinct elements from A, then doing LEFT OUTER JOIN with B and specifying B's value (thats used for joining) to be NULL.

SELECT DISTINCT A.id, A.this, A.that

FROM A

LEFT OUTER JOIN B ON A.id=B.id

WHERE B.id=NULL

This works because the entries that have A.id=B.id in B dont have their id NULL and by specifying B.id=NULL we omit all those entries from A, and are left with only entries from A that are not matching in B

Add a comment
Know the answer?
Add Answer to:
Can someone explain this currently reviewing MySQL does not support the difference (except) operator in SQL-99...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • please answer as soon as possible. i only have 37 minutes left. i need help determining...

    please answer as soon as possible. i only have 37 minutes left. i need help determining whether or not the examples are word for word plagarism, paraphrasing plagarism, or not plagarism at all 14% Sun 12 29:06 AM Christoph Window Help Edi Safari Fle View History Bookmarks indiane edua In The Case Below The Original Source to How to Recognine PagiaemUndergraduate Cerication Tests: Se. Plagasm Ceficate Item 1 View In the case below, the original source material is given along...

  • Article Summary I Read the article below and provide feedback by writing a 2 page summary....

    Article Summary I Read the article below and provide feedback by writing a 2 page summary. Please write in essay format (you may include the questions but the response should be in essay format) Must include the following information Title of the article Author(s) of the article Reference list (include the article itself and any other reference material such as another article that is cited in your summary). Use the reference list in the article to get information about another...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT