hi , how can i delete duplicate records in two tables...

  • hi , how can i delete duplicate records in two tables...

  • Please send sample table schemas, sample data and desired result. You must agree that there is no precise answer to your question.

    Piotr

    ...and your only reply is slàinte mhath

  • how can i delete duplicate records in a table

  • Yes you can remove duplicate record by three ways:

    1. group by using row_number()

    2. drived table using row_number()

    3. having class with count function

    for more detail see help or sent me your problem code for answer

    Shamas Saeed

    Pakistan

  • Also, do a search in the Scripts [/url]section here in SSC. You'll find all kinds of examples for doing what you need.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • :-)with deldup as(select_rownumber()over(partition by(empide) group by(empid)

    ))as da from emp wher 1=1

    delete from deldup where da>1

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply