How to compare two record variables of same type

My requirement is that i have an editable grid which has lets suppose 1000 rows and i have to only sent the updated one to Database.

i.e. if user change 3 out of 1000 rows then only 3 should be sent to process model or a!writerecords for updating this to DB rather than sending the whole 1000 rows. So what i did i created two variables for fetching record data from DB. 1 containing the original data and second containing the changed data, Now my requirement is to compare both these variables so that i can find the changed data which can then be sent for update.

  Discussion posts and replies are publicly visible