| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|||
query to display only the distinct data and not the identical oneshello,
i am working on a table having a single column of 10 rows(For simplicity). out of the 10 rows of data, one of the data is distinct from the rest while the data in the remaining 9 rows are exactly identical. i am looking for a query which display only the distinct data and not the identical ones. here the data type is number. can anybody help me out. |
|
|||
|
Quote:
select <coloumn name>, count(*) from <tablename> group by <columnname> having count(*) <=1; |