如何将JOIN
与OFFSET
一起使用?
我注释掉了产生错误incorrect syntax near inner
的行
ALTER PROCEDURE [dbo].[spPagination] -- ORDER BY id
@PageNumber INT,
@PageSize INT
AS
BEGIN
SET NOCOUNT ON;
SELECT
Emp.id, Emp.[firstName], Emp.[lastName], Emp.[salary],
Emp.[startDateWork], Emp.age --, Rol.[name] as Role
FROM
[dbo].tblEmployees5m Emp
ORDER BY
id
-- INNER JOIN [dbo].[tblRoles] Rol ON Emp.roleId = Rol.id
OFFSET @PageSize * (@PageNumber - 1) ROWS
FETCH NEXT @PageSize ROWS ONLY
OPTION (RECOMPILE);
END
答案 0 :(得分:1)
尝试一下。您的@Transaction
职位不正确。
import '../node_modules/@webcomponents/webcomponentsjs/webcomponents-lite';
import '../node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter';