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: 2nd table

Re: 2nd table

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 09 Aug 2006 13:02:48 -0700
Message-ID: <1155153768.744941@bubbleator.drizzle.com>


mike7411_at_gmail.com wrote:
> What is the easiest way to update a 2nd table based on data in a
> materialized view of a 1st table? The 1st table and 2nd table should
> be identical following the update.
>
> Thanks.
>

BEGIN
   EXECUTE IMMEDIATE 'TRUNCATE TABLE t';    INSERT INTO t SELECT * FROM mv;
END;
/

You asked for the easiest. I can't think of anything "easier."

Provide version number of other relevant information and other recommendations are possible.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Wed Aug 09 2006 - 15:02:48 CDT

Original text of this message

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