The logic seems correct, but there are some inputs on that.

1. You may not be able to use dynamic view in pl sql. Use your own table
containing the required table names.
2. Use "execute immediate" from pl sql to alter the table.

Execute immediate ' alter table XYZ rename column ABC to DEF' ;


Regards,
Jignesh Makwana
On Nov 1, 2011 12:56 PM, "faizal mangattil`" <faizmangat...@gmail.com>
wrote:

> i want to rename column name from set of tables.
>
> for ex:
>
> Begin
>    For Rec in (Select table_name from dba_tables where table_name like
> '%_AUD' AND OWNER='AUD')
>    Loop
>         ALTER TABLE *REC.TABLE_NAME *
>         RENAME COLUMN AUD_MODIFIED_TIME TO MODIFIED_TIME;
>    End Loop;
> End;
>
> Please share your logic
> regards
> faizal
>
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to