Friday, March 23, 2012

Need distinct rows from table based on (col1) only - overall required multiple c

Need rows of specific table having distinct col1, but along with col1 I also need col2,col3, .... But distinct is required on only col1.

I tried ---
Select col1, col2, ... , coln from table1 where ( select distinct col1 from table1)

But result contain repetitive col1 rows due to wrong syntax of mine. Also tried exist, union, right join but failed finally ....

give your some site:
one is mser.net,another is msdnx.com,search by google in the site....

No comments:

Post a Comment