Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Update All Tables Containing Column
Thanks Ivan. I realize that I can do this. I am hoping to do it
programatically, using dynamic SQL, and for each table containing the
column, update that column.
Thanks again.
"Alex Ivascu" <alexdivascu_at_yahoo.com> wrote in message
news:96Or8.119565$QB1.28168414_at_typhoon3.we.ipsvc.net...
> You can run a simple dynamic sql like this one, to accomplish what
you want:
>
> SELECT 'UPDATE '||TABLE_NAME||' SET USERID=''TEST'';'
> FROM USER_TAB_COLUMNS
> WHERE COLUMN_NAME = 'USERID';
>
> Hope this helps.
>
> Alex Ivascu
> DBA
>
>
> "Linda Turner" <LindaTurner_at_cdgx.com> wrote in message
> news:FpBr8.18239$XP2.7296902_at_typhoon.southeast.rr.com...
> > I am new to Oracle. We don't use Pl/SQL at our site, since we use
> > 3-rd party software. I need to look through the Oracle dictionary
> > (user_tab_columns) for all tables containing a particular column
> > ("USERID"), and update that to a different value.
> >
> > Can someone provide me with a brief example of how to do this in
> > PL/SQL?
> >
> >
>
>
>
>
Received on Sun Apr 07 2002 - 06:35:51 CDT