declare @customers table(custid int,cusname varchar(50))
insert into @customers(custid,cusname)
@PageSize int, @PageNumber int
set @PageSize = 5
--set @PageNumber = 1
set @PageNumber = 2
Declare @RowStart int
Declare @RowEnd int
if @PageNumber > 0
SET @PageNumber = @PageNumber -1
SET @RowStart = @PageSize * @PageNumber + 1
SET @RowEnd = @RowStart + @PageSize - 1
;with cust as
select custid, cusname, row_number() over (order by custid) RowNumber
select custid, cusname from cust where RowNumber >= @RowStart and RowNumber <= @RowEnd
Recently I encountered a case when I knew much more about the data than the optimizer. Originally the performance was horrible, this is why...
Introduction Web Service is known as the software program. These services use the XML to exchange the information with the other software wi...
Introduction Advanced Integration is for sellers who want more flexibility when creating payment buttons. Advanced Integration facilitates t...
Most experienced developers will tell you that end users tend to "judge an application by its cover". In other words, they don'...
Dependency Injection (DI) is a software design pattern. Dependency Injection reduces the hard-coded dependencies among your classes by inje...