Stored Procedure | paging/* This stored procedure is used to display the paging of the registered user * *
CREATE PROCEDURE Usp_pageduserreg
@iPage int,
@iPageSize int
As
Begin
--Turn off automatic counter function
SET NOCOUNT on
--declare variables
DECLARE @iStart INT--Start record
DECLARE @iEnd INT--end record
DECLARE @iPageCount INT--Total number of pages
--Create the temporary table to build temporary tables
Create Table #PagedUserReg
(
ID int identity,
UserID Int (4),
Nick Char (20),
Truename Char (10),
Email char (100),
Department char (50),
Zhuanye Char (50),
Mnianji Char (50),
Sex char (10),
Birthday datetime,
PWD char (20),
Room char (10),
Telphon Char (50),
Qustion char (100),
Answer char (50),
ImagePath Char (100)
)
--Populate the Temp table to add data
Insert into #PagedUserReg (userid,nick,truename,email,department,
Zhuanye,mnianji,sex,birthday,pwd,room,telphon,qustion,answer,
ImagePath)
Select Userid,nick,truename,email,department,
Zhuanye,mnianji,sex,birthday,pwd,room,telphon,qustion,answer,
ImagePath
From Reguser
--Work out how many pages there are the total page count
Select @ipageCount =count (*)
From Reguser
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.