B
blinking1313
Unregistered / Unconfirmed
GUEST, unregistred user!
CREATE procedure Get_Product(@startIndex int,@endIndex int,@docount bit)asset nocount onif(@docount=1)select count(*) AS Counts from Productelsebegindeclare @indextable table(id int identity(1,1),nid int)set rowcount @endIndexinsert into @indextable(nid) select ID from Product order by ID descselect * from Product O,@indextable t where O.ID=t.nidand t.id between @startIndex and @endIndex order by t.idendset nocount offGO