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