这条SQL语句有错误吗?
create proc max_speed
@table nvarchar(20),
@currentpage int,
@pagesize int,
@orderby nvarchar(20)
as
SELECT TOP @pagesize *
FROM @table
WHERE (@orderby NOT IN
(SELECT TOP @pagesize*@currentpage id
FROM @table
ORDER BY @orderby))
ORDER BY @orderby
Server: Msg 170, Level 15, State 1, Procedure max_speed, Line 7
Line 7: Incorrect syntax near '@pagesize'.
Server: Msg 170, Level 15, State 1, Procedure max_speed, Line 10
Line 10: Incorrect syntax near '@pagesize'.