From oracle-l-bounce@freelists.org Wed Jun 30 21:25:40 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i612PFL26871 for ; Wed, 30 Jun 2004 21:25:25 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i612P5626846 for ; Wed, 30 Jun 2004 21:25:15 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4C5AF72C027; Wed, 30 Jun 2004 21:07:28 -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 21798-41; Wed, 30 Jun 2004 21:07:28 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 9232372C24E; Wed, 30 Jun 2004 21:07:27 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 30 Jun 2004 21:06:01 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B8F3B72C0A5 for ; Wed, 30 Jun 2004 21:05:59 -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 21973-09 for ; Wed, 30 Jun 2004 21:05:59 -0500 (EST) Received: from www.hotsos.com (hotsos.com [209.120.206.15]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BC0DE72C027 for ; Wed, 30 Jun 2004 21:05:58 -0500 (EST) Received: from Dumbledore (c-67-171-174-60.client.comcast.net [67.171.174.60]) (authenticated (0 bits)) by www.hotsos.com (8.12.11/8.11.0) with ESMTP id i612SfbO025161 for ; Wed, 30 Jun 2004 21:28:43 -0500 From: "Karen Morton" To: Subject: RE: DUPLICATE ROWS. Date: Wed, 30 Jun 2004 19:28:35 -0700 Organization: Hotsos Enterprises, Ltd. Message-ID: <002401c45f13$210639d0$6401a8c0@Dumbledore> MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <8A3E984ACBACB541B9C01DCD6D7372CA01A06A@ssng11p33002.sg.csfb.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal X-Virus-Scanned: by amavisd-new at freelists.org X-archive-position: 4132 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: karen.morton@hotsos.com Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l X-Virus-Scanned: by amavisd-new at freelists.org Another way to find/remove duplicate rows is: SELECT test_id FROM test t WHERE t.rowid > (SELECT MIN(t1.rowid) FROM test t1 WHERE t.test_id=t1.test_id); Then, if you wanted to get rid of the dups, just DELETE: DELETE FROM test t WHERE t.rowid > (SELECT MIN(t1.rowid) FROM test t1 WHERE t.test_id=t1.test_id); Karen Morton Hotsos Enterprises, Ltd. http://www.hotsos.com -----Original Message----- From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org]On Behalf Of Seema Singh Sent: Thursday, July 01, 2004 6:22 AM To: oracle-l@freelists.org Subject: DUPLICATE ROWS. Here is select count(test_id) from test; shows 102 rows select count(distinct(test_id) from test; shows 100 rows How to find those 2 rows ? I tried to run to find by using max rowid or min rowid but unable to.if some one have quesry can pl send to me thx ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------