Title / Description
Code DECLARE @OriginalRecord TABLE (id INT NOT NULL, email NVARCHAR(150) NULL) DECLARE @UpdatedRecord TABLE (id INT NOT NULL, email NVARCHAR(150) NULL) INSERT INTO @OriginalRecord VALUES ( 1, 'tester@lhh.com') INSERT INTO @UpdatedRecord VALUES ( 1, 'tester@lhh.com') SELECT * FROM @UpdatedRecord EXCEPT SELECT * FROM @OriginalRecord UPDATE @UpdatedRecord SET email = NULL SELECT * FROM @UpdatedRecord EXCEPT SELECT * FROM @OriginalRecord UPDATE @UpdatedRecord SET email = 'BestDBAEver@hot.com' SELECT * FROM @UpdatedRecord EXCEPT SELECT * FROM @OriginalRecord UPDATE @UpdatedRecord SET email = 'bestdbaEver@hot.com' SELECT * FROM @UpdatedRecord EXCEPT SELECT * FROM @OriginalRecord
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code