[RESOLVED] How to avoid duplicates ?
Hello,
I have a database in which there are members, i need to extract the countries out of this members database and do not list countries again and again for example:
suppose there are 3 members, 2 from US and 1 from UK. Now i run a simple query i.e: SELECT * FROM members ...this query will now list 3 member countries i.e:
US
US
UK
whereas i just want it like:
US
UK
How can i achieve this ?
Thanks.
Re: How to avoid duplicates ?
You can use a SELECT query which just displays countries and append the word DISTINCT to the query to remove duplicates. E.g:
Code:
SELECT DISTINCT country FROM members
Re: How to avoid duplicates ?
Very thanks it works muhahahahha :-)
Re: How to avoid duplicates ?
Don't forget to mark this thread [RESOLVED] if you problem has been solved ;)