deleting duplicate records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinod
    New Member
    • Aug 2006
    • 40

    deleting duplicate records

    dear friends,
    suppose i've one table, it has only to rows.the two rows are are same as it is.how can i delete one row from that table?


    thank you verymuch
  • cbellizzi
    New Member
    • Aug 2006
    • 5

    #2
    SELECT DISTINCT *
    INTO #HOLDING
    FROM >your table<
    GO
    TRUNCATE TABLE >your table<
    GO
    INSERT >your table<
    SELECT *
    FROM #HOLDING
    GO
    DROP TABLE #HOLDING
    GO

    Comment

    • wappy
      New Member
      • Aug 2006
      • 8

      #3
      you can add another column of type bigint make it auto increment by setting Identity properties to Yes. then you can mannually delete the row :)


      Originally posted by vinod
      dear friends,
      suppose i've one table, it has only to rows.the two rows are are same as it is.how can i delete one row from that table?


      thank you verymuch

      Comment

      Working...