I'm trying to track the updated rows in my database by saving them in another table. I have a code like this:
"UPDATE Table1 SET [HastaSN] = @HastaSN WHERE Id = @Id; INSERT INTO Changes ([TableName],[Ids]) VALUES ('Table1 ', (SELECT IDENT_CURRENT('[Table1 ]')))"
I always get a table when I try to update a few rows in my database :
TableName Ids
Table1 56697
Table1 56697
Table1 56697
It's just showing me the last ID of the table. Not every ID number. How do I fix this problem?