1.UserID 并非主键,UserID有重复值
SELECT b.*
FROM(SELECT*,rid=ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY UserID) FROM EmployeeAllInfo) bWHERE rid =1本文共 212 字,大约阅读时间需要 1 分钟。
1.UserID 并非主键,UserID有重复值
SELECT b.*
FROM(SELECT*,rid=ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY UserID) FROM EmployeeAllInfo) bWHERE rid =1转载于:https://www.cnblogs.com/fuge/archive/2012/09/04/2670080.html