MySQL Forums
Forum List  »  Newbie

Re: Delete and select in the same query
Posted by: Rick James
Date: September 29, 2014 11:22PM

(definition problem)
Union does exclusive or on statement results (union all does inclusive or).
-->
UNION ALL does "inclusive or" without deduplicating.
UNION DISTINCT does "inclusive or" with deduplicating.

"exclusive or" would require the UNION of two SELECTs with LEFT/RIGHT JOINs -- messy and rarely needed.

Options: ReplyQuote


Subject
Written By
Posted
September 28, 2014 02:59AM
Re: Delete and select in the same query
September 29, 2014 11:22PM


Sorry, you can't reply to this topic. It has been closed.

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.