SQL query: there is one table, you want to display all records in which the value of a specific column is found only 1 time

  • 3
    In general, select * from table group by столбец having count(1)=1 but many SQL won't work this way and you need to look for other ways depending on the dialect (which you did not specify) - Mike

1 answer 1

eg

 SELECT count(id) num,id FROM t1 group by id having count(id) = 1 

http://sqlfiddle.com/#!3/16b55/2