Is there any way to get biggest primary key value of the table after update statement?
I have a C# function takes parameters like, table name, and values to update a table. It generates a dynamic sql statement and executes it. So when I run function, if there is an insert it returns me last inserted id as int, there is not problem but if there is an update then I cannot get biggest updated id of the table.
for example I have a table like; RowId, Name, Lastname
-- this statement may update multiple rows
Update Person
set name = 'sample name'
where name = 'name' and lastname = 'lastname'
-- get last updated rowid here