# Precedence of set union, intersect, and difference?

Online, I have read contradicting opinions on whether intersect should take precedence over union (by analogy to logical and and or), or whether all set operators should have equal precedence.

Which way makes more sense and why?

And where does difference fit in? (I'd say it should be equal precedence to intersect because A - B = A intersect B'.)

-
What do you mean with "precedence" here? –  Rasmus Oct 11 '10 at 13:33
Yeah the connection with arithmetic operators is the second best guide. Usually you can just figure it out by looking at which bracketing make sense though. –  anon Oct 11 '10 at 13:34
I don't understand the downvote to this question. –  Aryabhata Oct 11 '10 at 16:24
@Rasmus: Operator precedence determines whether A union B intersect C is (A union B) intersect C or A union (B intersect C). –  David R Tribble Oct 11 '10 at 17:01