You want the OUTPUT clause
UPDATE Items SET Clicks = Clicks + 1
OUTPUT INSERTED.Name
WHERE Id = @Id
More Related Contents:
- Use of SqlParameter in SQL LIKE clause not working
- WHERE IN (array of IDs)
- Passing array to a SQL Server Stored Procedure
- ExecuteReader requires an open and available Connection. The connection’s current state is Connecting
- How to pass an array into a SQL Server stored procedure
- Call a stored procedure with parameter in c#
- Insert 2 million rows into SQL Server quickly
- Calling stored procedure with return value
- Remove weird characters ( A with hat) from SQL Server varchar column
- SQL command INSERT is working but the data not appear in table
- Return value from SQL Server Insert command using c#
- How to pass sqlparameter to IN()? [duplicate]
- What represents a double in sql server?
- SqlConnection SqlCommand SqlDataReader IDisposable
- SqlBulkCopy from a List
- Connection timeout for SQL server
- MultipleActiveResultSets=True or multiple connections?
- How can I retrieve a list of parameters from a stored procedure in SQL Server
- How to keep single SQL Server connection instance open for multiple request in C#?
- Generate class from database table
- How to use SqlCommand to CREATE DATABASE with parameterized db name?
- Using SqlDataAdapter to insert a row
- Add WHERE clauses to SQL dynamically / programmatically
- Unable to connect to localDB in VS2012 – “A network-related or instance-specific error occurred while establishing a connection to SQL Server…”
- Fastest method for SQL Server inserts, updates, selects
- How do I calculate the equivalent to SQL Server (hashbytes(‘SHA1’,[ColumnName])) in C#?
- Why does the SqlParameter name/value constructor treat 0 as null?
- How to get efficient Sql Server deadlock handling in C# with ADO?
- Generating sql code programmatically
- What does a timestamp in T-Sql mean in C#?