Forum Discussion
hlalumiere
14 years agoRegular Contributor
You could select each table you need to query into a temporary copy and query it without affecting your actual data:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * INTO #history FROM usrHistory;
UPDATE #history SET Field1 = NULL WHERE Field1 = 0;
DROP TABLE #history;
If you need to test the result inside your application, then just make a backup of the database or a snapshot of the host VM before running your test, then restore it.
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * INTO #history FROM usrHistory;
UPDATE #history SET Field1 = NULL WHERE Field1 = 0;
DROP TABLE #history;
If you need to test the result inside your application, then just make a backup of the database or a snapshot of the host VM before running your test, then restore it.