Answered Questions

  • How to remove duplicate records from a table?

    Vijay

    • May 10th, 2012

    SELECT ID FROM TBLSAMPLE GROUP BY ID OR SELECT DISTINCT (ID) FROM TBLSAMPLE

    Code
    1. SELECT ID FROM TBLSAMPLE GROUP BY ID
    2. OR
    3. SELECT DISTINCT (ID) FROM TBLSAMPLE

    Mally

    • Feb 13th, 2012

    Good Code...however the code will delete all the duplicates... you may want to add:

    delete top(n) clause in your delete statement to exactly delete the required number of records.