Thursday, July 16, 2009

Oracle MINUS function works bottom to top

Remember that the MINUS function in Oracle works bottom to top and the order in which statements are written will change the result set! So select x from a minus select y from b is not the same as select y from b minus select x from a....The bottom part of the query is executed first and a MINUS function will always give those rows present in the bottom part of the query and not in the top half.

No comments: