这个SQL语句有什么错误???------------------在线等--------
CREATE PROCEDURE spPageUsers
( @pageindex int,
@pagesize int
) AS
DECLARE @num int,@maxld int
SET @num = @pageindex * @pagesize
select top @num @maxId = max(id) from users order by id asc
select top pagesize * from users where id > @maxld order by id asc
GO
-----------
提示说
select top @num @maxId = max(id)中@num附近有错误