Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Rows with duplicate values.

Re: Rows with duplicate values.

From: <yong321_at_yahoo.com>
Date: Wed, 08 Mar 2000 05:05:39 GMT
Message-ID: <8a4n31$srh$1@nnrp1.deja.com>


In article <8a4f8p$lql$1_at_starlifter.bentonrea.com>,   "rob nelson" <nelsons_at_bentonrea.com> wrote:
> We have a warehouse application that allows employee identity to be
> duplicated. I need to detect when this occurs. Is there a SQL syntax
for
>
> SELECT employeeid where rowcount(employeeid) > 1
>
> ?
>
>

Look at this:

SQL> create table test (mycol int);

Table created.

SQL> insert into test values (1);

1 row created.

SQL> insert into test values (2);

1 row created.

SQL> insert into test values (1);

1 row created.

SQL> select * from test;

    MYCOL


        1
        2
        1

SQL> select * from test group by mycol having count(*) > 1;

    MYCOL


        1

--
Yong Huang

(yong321_at_yahoo.com)
(http://www.stormloader.com/yonghuang/)

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Mar 07 2000 - 23:05:39 CST

Original text of this message

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