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

Complete Authentication System in ASP.NET Core using JWT

JWT (JSON Web Token) authentication is widely used for securing APIs in modern applications. In this article, we will build a complete authe...