From oracle-l-bounce@freelists.org  Wed May 18 08:05:58 2005
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air891.startdedicated.com (root@localhost)
 by orafaq.com (8.12.10/8.12.10) with ESMTP id j4ID5wfI021514
 for <oracle-l@orafaq.com>; Wed, 18 May 2005 08:05:58 -0500
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j4ID5w4Z021510
 for <oracle-l@orafaq.com>; Wed, 18 May 2005 08:05:58 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id E61C019370E;
 Wed, 18 May 2005 07:03:08 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 05090-04; Wed, 18 May 2005 07:03:08 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6E19E193336;
 Wed, 18 May 2005 07:03:08 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Subject: RE: Uniqueness
Date: Wed, 18 May 2005 08:00:59 -0400
Message-ID: <ABB9D76E187C5146AB5683F5A07336FF16E5E7@EXCNYSM0A1AJ.nysemail.nyenet>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Uniqueness
thread-index: AcVbcIZ/44enLvr/SyeNi6O/PWZyWwAMKVLA
From: "Mercadante, Thomas F (LABOR)" <Thomas.Mercadante@labor.state.ny.us>
To: <jacintakean@yahoo.com>, <oracle-l@freelists.org>
X-OriginalArrivalTime: 18 May 2005 12:01:00.0108 (UTC) FILETIME=[41C2E0C0:01C55BA1]
X-archive-position: 19830
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: Thomas.Mercadante@labor.state.ny.us
Precedence: normal
Reply-To: Thomas.Mercadante@labor.state.ny.us
X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on 
 air891.startdedicated.com
X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=ham version=2.63

You can also:

Select id, count(*)
>From mytbl
Group by id
Having count(*) > 1
/


-----Original Message-----
From: oracle-l-bounce@freelists.org
[mailto:oracle-l-bounce@freelists.org] On Behalf Of Kean Jacinta
Sent: Wednesday, May 18, 2005 2:12 AM
To: oracle-l@freelists.org
Subject: Uniqueness

Hi again,

Is there a way to check for uniqueness of a value ?
Apart from set the column to be unique ?

For example :

Table : mytbl
PK ID
----
1
2
3

Insert into mytbl (id) values (2);
=20
Oracle will give error.=20


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l

