Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Unique Index on a view
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 guyReceived on Tue Nov 21 2000 - 08:05:24 CST
![]() |
![]() |