Can I extract the extract records that are duplicated in sql?

前端 未结 3 873
眼角桃花
眼角桃花 2021-01-23 20:04

In my table I have the following columns:

id|name|gender

I would like to extract all the names which are duplicated, but I don\'t want to scan

3条回答
  •  渐次进展
    2021-01-23 20:31

    Is this what you're looking for?

    select name from tbl
    group by name
    having count(*) > 1
    

提交回复
热议问题