SELECT DESTINCT(ip) FROM table_name

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

SELECT DESTINCT(ip) FROM table_name

Post by phice »

I've seen something like that somewhere, but I forgot how to do it.

What it does is selects everthing from the table, listing only different values of the columb "ip". Anyone know what the query line for this is?
Image Image
Rob the R
Forum Contributor
Posts: 128
Joined: Wed Nov 06, 2002 2:25 pm
Location: Houston

Post by Rob the R »

You have it right, for the most part:

Code: Select all

SELECT DISTINCT ip FROM table_name;
http://www.mysql.com/doc/en/Selecting_c ... tml#IDX400
Post Reply