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: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 21 Nov 2000 22:05:24 +0800
Message-ID: <3A1A8124.5D6@yahoo.com>

Brian Tkatch wrote:
>
> >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

Use an INSTEAD OF trigger to perform the check yourself..

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

(Apologies for not replying to any emails - YAHOO have a dead server)

"Early to bed and early to rise, 
 makes a man healthy, wealthy and wise." - some dead guy
Received on Tue Nov 21 2000 - 08:05:24 CST

Original text of this message

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