Re: unique or distinct?
Date: 8 Nov 1994 10:38:19 -0700
Message-ID: <39od2b$e0g_at_nyx10.cs.du.edu>
In article <39mad3$bpo$1_at_mhadg.production.compuserve.com>,
Steve Edelstein <74160.645_at_CompuServe.COM> wrote:
>You SELECT DISTINCT values from a table. The key word UNIQUE is
>used for primary key indexes only. It is not a word that is used
>in a SQL Select.
>
>--
>Steve Edelstein VOICE: 212-956-3670
>Relational Business Systems CompuServe: 74160,645
>124 West 60th Street Suite 47C Author of
>New York, NY 10023 "Learning Oracle Forms"
UNIQUE can be used in a SELECT statement. We have Oracle V6.0.36 on SCO-UNIX and the following two statements are the same:
SELECT UNIQUE column FROM table;
SELECT DISTINCT column FROM table;
They have the same explain plans as well. Received on Tue Nov 08 1994 - 18:38:19 CET