Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: create materialized view
> I'm trying to build a materialized view in
> order to import daily data from another DB
>
> CREATE MATERIALIZED VIEW VW_LINKS_155
> BUILD IMMEDIATE
> REFRESH FAST NEXT sysdate + 1
> AS SELECT * FROM VW_LINKS_155_at_snap_dblink
>
> The matter is that Oracle complains that VW_LINKS_155_at_snap_dblink (a
> remote view accessed via snap_dblink ) doesn't have a PK constraint.
As far as I know it is not possible to impose primary key constraint on view. I don't know if it is possible to make materialized view on view, maybe you can set it only on table.
Try creating materialized view with ROWID treated as primary key:
CREATE MATERIALIZED VIEW
WITH ROWID
AS SELECT ...
Tomek
Received on Thu Feb 10 2005 - 06:07:14 CST