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

Home -> Community -> Usenet -> c.d.o.misc -> Re: create materialized view

Re: create materialized view

From: <fmarchioni_at_libero.it>
Date: 11 Feb 2005 01:12:19 -0800
Message-ID: <1108113139.053875.149890@z14g2000cwz.googlegroups.com>


Well I have solved the problem creating the materialized view with
"WITH ROWID" option, so Oracle doesn't complain about pk.

Anyway I wasn't able at all to add the pk to the view:

"CREATE VIEW Emp_view

(id PRIMARY KEY DISABLE NOVALIDATE, firstname) AS SELECT employee_id, first_name
FROM employees
WHERE department_id = 10;"

In this statement I get "Invalid character" after PRIMARY KEY keyword.

All I could do is adding an Unique constraint link this:

"ALTER VIEW Emp_view

ADD CONSTRAINT emp_view_unq
UNIQUE (first_name) DISABLE NOVALIDATE;"

but adding a primary key constraint doesn't work at all.

The banner of SQLplus says that I have this version of the DB:

"Connected to:

Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production"

do I have to activate any setting of the DB in order to add a pk on a view ???
Thanks again
Francesco Received on Fri Feb 11 2005 - 03:12:19 CST

Original text of this message

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