1.UserID 并非主键,UserID有重复值
SELECT b.*
FROM
(
SELECT*,rid=ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY UserID) FROM EmployeeAllInfo
) b
WHERE rid =1
1.UserID 并非主键,UserID有重复值
SELECT b.*
FROM
(
SELECT*,rid=ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY UserID) FROM EmployeeAllInfo
) b
WHERE rid =1