>Hi,
>I've some duplicate rows in one table, i need to remove all duplicate values from the table ... for ex if in a table city i've following data
>
>row code city
>1 1 city1
>2 1 city1
>3 2 city2
>4 3 city3
>5 4 city4
>6 4 city4
>
>so the query should eliminate duplicate for code 1 and 4 ....and 4 rows shud remain.
>Any help plz...I dont know how to write query for this.
>thanx
If you want something like this, "row" becomes meaningless. You can then use the DISTINCT keyword as in:
Select DISTINCT Code, city from Table...
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com