DISTINCT
Posted: Mon Aug 09, 2010 4:01 pm
Don't know why I had trouble with this but thought I would share
if you ever need to select a field only once yu can use DISTINCT.
so lets say you have a DB with a table for a auction full of items and many of them are the same item.
Lets say you want to list all items in the auction but not repeat all the ones that are the same
select DISTINCT name, seller from auction
works like a charm. Most of you may already know this, I had known of that keyword. Thought I would share.
if you ever need to select a field only once yu can use DISTINCT.
so lets say you have a DB with a table for a auction full of items and many of them are the same item.
Lets say you want to list all items in the auction but not repeat all the ones that are the same
select DISTINCT name, seller from auction
works like a charm. Most of you may already know this, I had known of that keyword. Thought I would share.