Tuesday, January 19, 2016

Update a row and returning a value with one query - SQL

This will return single value which is updated
Inside can return multiple value also

You want the OUTPUT clause

UPDATE data SET count = count + 1
OUTPUT INSERTED.count
WHERE Id = @Id

No comments:

Post a Comment

Opps Part 1 : Abstraction

  Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...