how to get the updated record in sql server

Posted by Venkatesh under Sql Server on 1/30/2014 | Points: 10 | Views : 937 | Status : [Member] | Replies : 1
Hi,

i have one table which is having two columns(employee name,city), this will be bind to gridview in asp.net.
when i updating city it is updating to table by employee name. the next page i want to show the update record at top level. how can i get this. there is now identity column or no date time column just it is having two columns with varchar data type. how can i get this?

Thanks,
Venkatesh.P




Responses

Posted by: Bandi on: 1/30/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Add one column UpdateTs DATETIME to the table and whenever you are updating records update UpdateTs column with current timestamp (GETDATE())

ALTER TABLE TableName ADD UpdateTs DATETIME 


Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Venkatesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response