Using select SELECT * FROM DBA_TAB_COLUMNS WHERE column_name like 'CD_SETOR'
I get 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 the CD_SETOR column on all found tables, change to XPT).
Purpose: Do not update table by table, there are more than 500 tables with the same FK.