I have a sequence of update queries on a very huge table TableA. Now when it updates the table I want to capture all the primary key of the records getting updated. This primary key will then be used to join with TAble B. Can I achieve this in the Update statement itself? I read we have ON UPDATE clause in SQL which can do this. Do we have a similar option in Teradata?
I can create a temp table with the primary key instead of updating the table directly and then use this temp table to update TableA as well as join with TableB. But as I said earlier there are multiple such Update statements. SO I will have to drop and create this table multiple times. Also, the Update statement updates the Status. And the second Update statement uses this status in TABLEA to update it. So I have to make sure I update the tableA as well as capture the primary key. I cannot keep inserting records in the temp table and then in the end Update the TableA. Any help is appreciated!