Create Proc P_AA
( @CountRows INT, --返回记录总数
@CountPage INT --返回总页数
)
AS
set @Sqls = 'select @a=count(1) from tb
exec sp_executesql @sqls,N'@a int output',@CountRows OUTPUT
-----返回总页数
if @CountRows <= @PageSize
set @CountPage = 1
else
begin
set @CountPage = @CountRows/@PageSize
if (@CountRows%@PageSize) > 0
set @CountPage = @CountPage + 1
END
delphi 怎么获取返回的值啊?
Create Proc P_AA
( @CountRows output, --返回记录总数
@CountPage output--返回总页数
)