Action Queries [modified]
-
Is there a way to view the results of an action query without committing the changes to the database in SQL Server 2000? Any suggestions or tips will be greatly appreciated. -Garrett
I'm not really sure how wise this is but this:
SELECT * FROM [Order Details]
BEGIN TRANSACTION
DELETE FROM [Order Details]
SELECT * FROM [Order Details]
ROLLBACK TRANSACTION
SELECT * FROM [Order Details]This shows the state of the Order Details table, then it shows the result of the delete operation, but after the transaction is rolled back the state of the database reverts. Is this the kind of thing you are looking for? [ADDITION] I should point out that this does actually make changes to the database and it could impact performance of other things running in the database. [/ADDITION]
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog -- modified at 12:51 Monday 22nd May, 2006
-
I'm not really sure how wise this is but this:
SELECT * FROM [Order Details]
BEGIN TRANSACTION
DELETE FROM [Order Details]
SELECT * FROM [Order Details]
ROLLBACK TRANSACTION
SELECT * FROM [Order Details]This shows the state of the Order Details table, then it shows the result of the delete operation, but after the transaction is rolled back the state of the database reverts. Is this the kind of thing you are looking for? [ADDITION] I should point out that this does actually make changes to the database and it could impact performance of other things running in the database. [/ADDITION]
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog -- modified at 12:51 Monday 22nd May, 2006