我的表格包含約5000行。我想知道表格中的特定行位置。 我的存儲過程是:行號提取
CREATE PROC Sp_getrownumber(@MemberID INT)
AS
SELECT Row_number()
OVER ( ORDER BY joiningdate ASC) AS Rownumber,
M.memberid,
P.name,
M.joiningdate
FROM tblmemberdata M
JOIN tblpersonaldetails P
ON M.memberid = P.memberid
但是,當我米試圖取2特定行,該行沒有被顯示1 的代碼是:
CREATE PROC Sp_getrownumber(@MemberID INT)
AS
SELECT Row_number()
OVER ( ORDER BY joiningdate ASC) AS Rownumber,
M.memberid,
P.name,
M.joiningdate
FROM tblmemberdata M
JOIN tblpersonaldetails P
ON M.memberid = P.memberid
WHERE M.memberid = @MemberID
如何獲取確切的行號?