Reputation: 807
How to select like if I have columns with rows
column
row1
row1
row2
row3
row3
And when outputting all rows, only to output like..
row1
row2
row3
If there is rows with same value, I want to output them just once.
Upvotes: 1
Views: 102
Reputation: 64409
Either use
SELECT DISTINCT(column) FROM TABLE
or
SELECT column FROM TABLE
GROUP BY column
Upvotes: 0