Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Update All Tables Containing Column

Re: Update All Tables Containing Column

From: Alex Ivascu <alexdivascu_at_yahoo.com>
Date: Sun, 07 Apr 2002 02:25:09 GMT
Message-ID: <96Or8.119565$QB1.28168414@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 Sat Apr 06 2002 - 21:25:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US