摘要: CREATE PROC sp_PageCount@tbname sysname, --要分页显示的表名@Where nvarchar(1000)='', --查询条件@Count int OUTPUT --总页数asDECLARE @sql nvarchar(4000)SET @sql=N'SELECT @Count=COUNT(*)' +N' FROM '+@tbname +N' where '+@WhereEXEC sp_executesql @sql,N'@Count int OUTPUT',@Count O 阅读全文
posted @ 2011-03-20 19:35 ThirteenYi 阅读(257) 评论(0) 推荐(0) 编辑