I’m trying to build a Materialized View on top of a prebuilt table. I can use the below syntax with no modifiers and it works fine.
CREATE MATERIALIZED VIEW TESTRESULT
ON PREBUILT TABLE
SELECT ...
FROM ...
WHERE ...
However, when adding extra clauses to the Materialized View, I get the error “Missing Keyword”. I’m not sure what I’m missing and I can’t find any documentation online in conjunnction with building on top of a prebuilt table and adding extra clauses.
CREATE MATERIALIZED VIEW TESTRESULT
NOCACHE
LOGGING
NOCOMPRESS
NOPARALLEL
BUILD IMMEDIATE
REFRESH FORCE ON DEMAND
WITH PRIMARY KEY
ON PREBUILT TABLE
AS
SELECT ...
FROM ...
WHERE ...
Oracle Verision : 10g
The ON PREBUILT TABLE option is not compatible with some of your options, as described in the CREATE MATERIALIZED VIEW documentation:
Also make sure you have the arguments is the right order.
The following works: