SQL Server Get Updated Column Value -


i have col1 in table initial value of 0 1 row, want updated value of col1.

my update query :

update table set col1 = col1 + 1 

i can last update put output :

update table set col1 = col1 + 1 output inserted.col1 

but not sure output value related same query or last updated other query @ same time.

the value returned value of update statement. not reflect updates made other users.

edit:

you can store value in variable without output clause (https://msdn.microsoft.com/en-us/library/ms177523.aspx):

update table set @col1 = col1 = col1 + 1; 

Comments

Popular posts from this blog

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

Android SDK Manager freezes after installation of OSX 10.11 El Capitan public Beta -