Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can someone clarify something on TAHITI for me? - re MVs
BD schreef:
[snip background]
>
> And a bit further down, they provide an example of a Primary Key view,
> but this create statement does NOT include the primary key columns of
> the master.
>
> The example given is CREATE MATERIALIZED VIEW oe.customers FOR UPDATE
> AS
> SELECT * FROM oe.customers_at_orc1.world;
>
Of course: select * selects all columns - including the PK column(s)!
> And my attempt to create an MV based on Primary key fails when I
> specify the PK values. My create statement is:
>
> CREATE MATERIALIZED VIEW TEST_MV
> TABLESPACE TS1
> BUILD IMMEDIATE
> USING INDEX
> TABLESPACE TS2
> REFRESH FORCE ON DEMAND WITH PRIMARY KEY (PK_VALUE) AS
> SELECT * FROM SCHEMA.MASTER_TABLE_at_DBLINK
> NOLOGGING;
>
I used this, once:
CREATE SNAPSHOT KMS.KMS_PROJECT_KLANTEN
PCTFREE 5 PCTUSED 80 TABLESPACE kms_data STORAGE (INITIAL 64k)
BUILD IMMEDIATE REFRESH FORCE ON DEMAND WITH PRIMARY KEY
AS SELECT * FROM KMS.kms_project_klanten@&1 PKN
WHERE EXISTS
....
As you see, the WITH PRIMARY KEY clause uses no columns.
See
http://download-west.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90125/statements_63.htm#2064169
-- Regards, Frank van Bortel Top-posting is one way to shut me up...Received on Wed Oct 11 2006 - 12:56:02 CDT
![]() |
![]() |