1
Using the select SELECT * FROM DBA_TAB_COLUMNS WHERE column_name like 'CD_SETOR'
i have as a result many tables with different Owner with the same CD_SETOR. EX:
Owner Tables Column Type
210 MVINTEGRA INTEGRA_ENTRADA_SOLICIT_AGDM CD_SETOR NUMBER
211 MVINTEGRA INTEGRA_ENTRADA_SOL_AGDM CD_SETOR NUMBER
212 DBAMV V_FFCV_ESTEIRA_CONTAS CD_SETOR NUMBER
213 DBAPS ITCONTAH_REJEITADA CD_SETOR NUMBER
214 DBAPS ITCONTAH_REJEITADA_0512 CD_SETOR NUMBER
215 DBAPS ITCONTA_HOSPITALAR CD_SETOR NUMBER
216 DBAPS ITCONTA_HOSPITALAR_0512 CD_SETOR NUMBER
217 DBAPS ITCONTA_MED CD_SETOR NUMBER
218 DBAPS ITCONTA_MED_0512 CD_SETOR NUMBER
219 DBAPS ITCONTA_MED_REJEITADA CD_SETOR NUMBER
220 DBAPS ITCONTA_MED_REJEITADA_0512 CD_SETOR NUMBER
221 DBAMV V_LOTE_ATENDIMENTO CD_SETOR NUMBER
Only these tables are populated with codes that no longer exist, and I want to update them all at once to. Ex (Where XPTO codes exist in CD_SETOR column in all tables found, switch to XPT).
Objective: Do not update table by table, there are more than 500 tables with the same FK.
Looking at the link below should help you solve the problem http://www.dba-oracle.com/oracle_tips_cascade_update.htm
– Roberto Pariz
What is the FK CASCADE option? A solution can be to mount an sql that generates an update script, as a single execution would be feasible
– Motta