Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • To find duplicate records in SQL

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 200
    Comment on it

    In SQL if we dont have used primary keys then our id gets repeated accidentally or unintentionally.


    In this case we need to find out how many records are same. We need to find out the same tuples or rows from a table.


    For doing that we will perform a query to figure out the number of record repeated how many times by counting it


    SELECT        FirstName, LastName, MobileNo, COUNT(FirstName) as CNT
    FROM        CUSTOMER
    GROUP BY    FirstName, LastName, MobileNo
    HAVING        COUNT(1) > 1
    


    This will show how many times the records gets repeated

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: