I am modifying a sql server 2005 stored procedure slightly for performance, and I would like to quickly make sure the old stored proc and the new one return the exact same r
EXCEPT is the key to compare two querys (as @jabs said).
SELECT count(*), * FROM "query 1 here" EXCEPT SELECT count(*), * FROM "query 2 here"
Adding count(*) for each query to make sure both have the same results. Just in case there are some repeated rows which are deleted by except.
count(*)