Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12014: table 'XXX' does not contain a primary key constraint

463485Apr 19 2006 — edited May 2 2006
Hi all,

I'm trying to create simple Mview on one big table on specific column as below eg:

this is my table :
CREATE TABLE XXX
(
A VARCHAR2(10 BYTE),
B VARCHAR2(10 BYTE),
C NUMBER,
D DATE,
E varchar2(10),
F varchar2(10),
G varchar2(5)
);

and I want to create mView on a few column as normal select statment, the purpose of this mView is to bush query performance as we need only information from A, B, D:

CREATE MATERIALIZED VIEW TEST_MV
REFRESH fast ON commit
ENABLE QUERY REWRITE AS
Select
a,b,d
from xxx;

when i create above mView, i got the error message :
"ORA-12014: table 'XXX' does not contain a primary key constraint"

what is the solution? pls help!!!

iKhmer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2006
Added on Apr 19 2006
8 comments
2,667 views