For testing purposes I’m wondering if the following two selects could ever be combined:
begin transaction
select x
from example_table
update example_table
set x = 'new value'
select x
from example_table
rollback transaction
Essentially, I’d like to see a result output like:
Column Name, Updated Column Name
If I understand you correctly you can do in using OUTPUT clause (SQL Server 2005 +)
From Books OnLine
…
…
EDITED