I need to update a row in a table and get the column value from it. I can do it with
UPDATE Items SET Clicks = Clicks + 1 WHERE Id = @Id; SELECT Name FROM Items WHERE Id = @Id
This generates 2 plans / table calls. Is it possible to modify the UPDATE statement in T-SQL to update and return the Name column with only 1 plan / access?
I am using C #, ADO.NET ExecuteScalar() or ExecuteReader() .
Robert Mar 31 '09 at 12:52 2009-03-31 12:52
source share