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

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -