How can I find the row of a table that was affected by the last DML operation?
The answer all depends on your version. One method that is version-independent is to add a new column to the table called DML_TIME. Then create a trigger which sets the DML_TIME column to SYSDATE on every INSERT, UPDATE or DELETE. Obviously, this method requires the trigger to be set up before the fact.
In Oracle 8i and higher, you can use Log Miner to mine the archived redo logs looking for this information.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
In Oracle 10g, you can use the Flashback Versions Query to see the last DML against the table, provided that DML operation occurred less time ago than the number of seconds specified by the UNDO_RETENTION initialization parameter.