SQL duplicates with different primary keys

前端 未结 7 1351
青春惊慌失措
青春惊慌失措 2021-01-24 19:56

I have a table in this form:

id | firstname | lastname
---+-----------+----------
1  | alex      | marti
2  | mark      | finger
3  | alex      | marti
4  | ted          


        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-24 20:31

    Select Id, First_Name, Last_Name
    FROM
    (
    Select Id, First_Name, Last_Name,
    Count() Over (Partition By First_Name,Last_Name) Count
    From Emp
    ) AS T
    Where T.Count > 1
    

提交回复
热议问题