In the program that I have currently assigned, there is a requirement that I copy the contents of the table to the backup table before actual processing.
While reviewing the code, an employee noticed that
INSERT INTO BACKUP_TABLE
SELECT *
FROM PRIMARY_TABLE
unreasonably risky, since tables can have different columns and different column orders.
I also cannot create / delete / rename tables. ~ ~ Sigh
The columns in the table are expected to change, so just hard coding the column names is not really the solution I'm looking for.
I'm looking for ideas on a reasonable, non-risky way to get this job done.
source
share