select * from xxminus select * from yyit will pick up all different records. it is usefull when compare 2 result set to find the differences.