Written By: Mark Gillis.Posted By: Tony Andrews
New, Final and Old tables are features that have been around in Db2 for several versions, at least back to v9.7, but they don’t seem to get a lot of use. I’m not sure why unless it’s just because they require an extra bit of syntax.
I still spend an appreciable percentage of my working life running scripts for our customers. Quite often something as straight-forward as some Inserts, Updates and Deletes but I think they’re handed to us
- in case they go wrong
- so that we can establish that they’re going to do what is expected; no more, no less
That’s fair enough; we bill ourselves as Db2 experts so applying a bit of rigour and auditability (that is a word; I just looked it up) is what we can add to the equation.
And it’s that auditability where these features can be very useful.
Extra SELECT statements
This is the obvious way of demonstrating that the changes you run are what is expected or hoped. Here’s a couple of examples. Let’s say we have an INSERT statement