10 Years
Discussion Span
Last Post by websmythe

I always start with Google for PL/SQL questions. It sometimes takes me to techonthenet.com (syntax refresher) or expertsexchange.com but I never start my search with those sites. As a last resort I will occasionally browse the documentation for some tidbit. You can’t search for something if you don’t know it exists.

The latest thing I have stumbled upon is the Flashback Versions query (10g) which allows you to see all the changes to a record for however far back your undo table space goes. This is useful for comparing what happens when I change something in an application and want to see the before and after.


Thanx. Looks like Giganto Triple Mohcachino material. ...Kool.

It can get complicated but here is a simple example. If the unique record 1234 had been changed in the last two days, we would see a row for each change. There are also pseudo columns you can add to see when each change was made.

SELECT tableAlias.* 
  FROM some_modified_table versions 
       between timestamp SYSDATE-2 and SYSDATE tableAlias 
 WHERE tableAlias.primaryKey= 1234

Definate mileage in that one... Now that I'm a couple a weeks far down the road...:) Can definately see a couple of use for that. Kool.


Actually now that I think about it... You've just given me a major clue into how "possibly" implement an offsite backup.... Thanx!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.