I have a table that has a column processed
it is value is zero for failure and 1 for success. I want to add a third temporary case, its value is 2.
my previous query is:
string query = "SELECT * FROM dbo.tableName WHERE processed = @processed";
I would like to do update for the rows that this selects makes. I can do that from .net of course, but I want to know if there is one query that can select the rows and update the process column at the same time.
i am working with sql server 2008
That question states a very old solution, which is the output, and I couldn't discover it my self.