Does any one know how can I write a SQL Server script to check whether table is contain duplicate phone number?
Example:
I have a table called customer with following data
name telephone
alvin 0396521254
alan 0396521425
amy 0396521425
How can I write a script in SQL Server that can return those records with duplicate telephone number??
To see values with duplicates:
To see related records in the table for those duplicates: