oracle10g - How to Update the column in whole Database? -
here situation, have table called empdetails(empcode, empname) 10 records , other tables have empcode also.
**example** empcode empname emp001 emp002 b emp003 c
now want update column empcode emp001 001 in whole database
**output** empcode empname 001
note: 1. didn't set primary key parent table.
can 1 please help?
try generate update statements
select 'update ' || owner || '.' || table_name || ' set empcode = substr ( empcode, 1, 3); ' sys.all_tab_columns owner = '{owner}' , column_name = 'empcode';
Comments
Post a Comment