Add Column Name in Table in Multiple Schemas in Database
declare
strr varchar2(2000);
begin
for i in ( select * from all_objects where object_type='TABLE' and object_name ='GRNM' and owner <> 'VFIP2324' )
loop
strr:= 'alter TABLE ' || i.OWNER||'.'||i.object_name || ' add PROD_TYPE varchar2(100) ';
execute immediate strr;
end loop;
EXCEPTION WHEN OTHERS THEN NULL;
end;
No comments:
Post a Comment