Results 1 to 3 of 3

Thread: Duplicate rows

  1. #1
    Join Date
    Jan 2004
    Posts
    21

    Unanswered: Duplicate rows

    Does anyone have a sql to delete duplicate rows from a column keeing one of them.


    Table1
    ColA
    --
    1
    1
    1
    2
    3
    4

    I want the result as
    Table1
    ColA
    --
    1
    2
    3
    4

  2. #2
    Join Date
    Dec 2003
    Location
    china
    Posts
    21
    create clustered index key on table(key) with ignore_dup_row;
    Walking .......

  3. #3
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Another option to find dup rows is

    SELECT * from TABNAME
    GROUP by AffectedColumn
    HAVING count(*) > 1

    This will give you the dup rows.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •