数据库
id name
1 suhana
2 nishantini
3 suhana
4 deepa
5 suhana
如何在字段名[name]中编写查询以获取输出
id name
1 suhana
3 suhana
5 suhana
答案 0 :(得分:0)
试试这个:
select id, name from table_name where name in (SELECT name FROM table_name group by name having count(name) > 1)