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: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Wed, 22 Nov 2000 12:35:00 GMT
Message-ID: <3a1bbd11.129376281@news.alt.net>

On Wed, 22 Nov 2000 02:54:30 GMT, David Grzebien <dgrzebie_at_columbus.rr.com> wrote:

>As Sybrand indicated, you cannot place such a constraint on a view since
>it is a derived object. All a view is is just a stored query in the
>database that may have a meaningful name to it.
>
>The UNION ALL function that you are using will allow all results to be
>returned to you from both tables. So if the table data looked as
>follows:
>
>Table A Table B
> 1 4
> 2 5
> 3 6
> 4 7
> 5 8
>
>The result of you view would produce:
> 1 2 3 4 4 5 5 6 7 8
>
>The UNION function is the function that will perform a unique sort on
>the data to eliminate the duplication. If the view was modified to just
>use the UNION function, the result set would be:
> 1 2 3 4 5 6 7 8
>
>Try it.
>
>Dave Grzebien
>Expert Technical Consultants, Inc.
>

The point is not to have a contraint on a view, or even to limit its output. I was trying to accomplish uniqueness in one row for two tables. Just curious if it is in someway possible.

Brian Received on Wed Nov 22 2000 - 06:35:00 CST

Original text of this message

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