how do I update several tables with columns that store social security number as a single transaction? I have over 68 tables to update the ssn with correct ssn.
asked Mar 30, 2015 at 04:03 PM in Default
From an update perspective, it would be more efficient to store the SSN in one table then reference that table from the 70 others. A single place to update.
Since that ship has undoubtedly sailed, you might write a stored procedure that updates the 70 tables. Write it so you pass in the old SSN and the new SSN then it updates the 70 tables accordingly. Wrap the 70 updates within a single transaction and commit/rollback all together when the batch is complete.
Based the question's comment chain and a bit of speculation, here's a rough outline: