Id Email UserName
1 [email protected] TaiseerJoudeh
2 [email protected] HasanAhmad
3 [email protected] MoatasemAhmad
4 [email protected] SalmaTamer
5 [email protected] AhmadRadi
6 [email protected] BillGates
7 [email protected] ShareefKhaled
8 [email protected] AramNaser
9 [email protected] LaylaIbrahim
10 [email protected] RemaOday
11 [email protected] FikriHusein
12 [email protected] ZakariHusein
13 [email protected] LaylaIbrahim
14 [email protected] TamerWesam
15 [email protected] KhaledHasaan
16 [email protected] AsaadIbrahim
17 [email protected] TareqNassar
18 [email protected] DianaLutfi
19 [email protected] TamaraMalek
20 [email protected] ArwaKamal
21 [email protected] SalmaTamer
22 [email protected] NisreenTamer
23 [email protected] SalmaTamer
去掉重复的UserName
delete Student2 where Id in
(
select id from (
select Id, UserName,ROW_NUMBER() over (partition by UserName order by id) orderid from Student2
)t1
where t1.orderid>1
)