Solution:- The following query can solve the problem.
Select * from TestTable T where Testno IN(Select MAX(Testno) from TestTable where T.Testname=Testname)
In this query Testno is the Testname is the column by which you want to distinct the rows, and Testno is the column which is not distinct (for e.g. Primary key)
No comments:
Post a Comment