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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Unique Index on a view

Re: Unique Index on a view

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 21 Nov 2000 22:09:32 +0100
Message-ID: <8veotb$47j30$1@ID-62141.news.dfncis.de>

No,

Views can not have constraints, as views are derived objects.

Regards,

Sybrand Bakker, Oracle DBA

"Brian Tkatch" <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK> wrote in message news:3a1adf00.72527546_at_news.alt.net...
> >CREATE TABLE a (a NUMBER(8));
>
> Table created.
>
> >CREATE TABLE b (a NUMBER(8));
>
> Table created.
>
> > CREATE VIEW c AS SELECT a FROM a UNION ALL SELECT a FROM b;
>
> View created.
>
> > CREATE UNIQUE INDEX d ON c(a);
> CREATE UNIQUE INDEX d ON c(a)
> *
> ERROR at line 1:
> ORA-01702: a view is not appropriate here
>
> Is there a way to achieve such a constraint?
>
> Brian
Received on Tue Nov 21 2000 - 15:09:32 CST

Original text of this message

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