I have to create a audit/history table on a master table so that I can store the old/current state of data in my audit table. I am planning to write following program --
1. Created the audit table with similar number of records.
2. Everyday at a particular time I will compare the audit/main table and push the records in audit table which are either updated or not present in the audit table so that the audit table = main table + old state of data.
I am unable to figure out the proper way to implement the point 2 above in oracle database.
Can someone please share his experience/ thoughts on the above problem.
Thanks a lot in advance.