CodePudding user response:
Select top 0? What is the point?Should not in (not empty)
CodePudding user response:
Top 0 and the data?CodePudding user response:
Make a judgment conditions Inum==1 when the SQL statement of the second line does not need toCodePudding user response:
[code=SQL] go
Go
Declare @ pageNum int. - page
Declare @ pageSize int. - the number of columns
Declare @ SQL varchar (Max)
The set @ pageNum=1;
The set @ pageSize=5;
Set @ SQL='select top + cast (@ pageSize as varchar (10)) +' * from WCDJ where wcid not in (select top '+ cast (@ pageSize * (@ pageNum - 1) as a varchar (20)) +' wcid from WCDJ) '
Print @ SQL
The exec SQL) (@
I this is written in SQL, you slightly change the
[/code]