if i have a table containing this data: a b c _|_|_ 1|b|c 2|e|g 3|e|g 4|d|z 5|r|m 6|d|t and now i want to select all values but only once for the b column like: SELECT * from table But same values in d only once; a b c _|_|_ 1|b|c select 2|e|g select 3|e|g don't because there is already selected a value for b containing e 4|d|z select 5|r|m select 6|d|t dont't because there is already selected a value for b containing d