Finding duplicate values in a SQL table

SELECT * FROM
    (
    SELECT Id, Name, Age, Comments, Row_Number() OVER(PARTITION BY Name,Age ORDER By Name)As Rank FROM Customers
    )AS B WHERE Rank>1

Comments

Popular posts from this blog

How to create RSS Feed in Asp.Net

Auto generate change scripts in SQL Server Management Studio SSMS for tables

HOW TO Use the NumericUpDown Control