if i have 1000 records and i want to access 20 ata time
from SQL server, what will be the query?
Answer Posted / santosh
u can easily done by the use of Row_number() in sqlserver.
Ex:-
declare @Lower_Bound int,@Upper_bound int
SET @Lower_Bound=1 -- change this as per requirement
SET @Upper_bound=20 -- change this as per requirement
Select Id,Name from(select row_number()over(order by id asc) as Temp_Id,Id,Name from M_Student)
M_Student where Temp_Id >=@Lower_Bound and Temp_Id<=@Upper_bound
Here My Table Name is M_Student(Id,Name) & I have made a Temporary Id column(Temp_Id).Here the result.
Thank U......
If any query then u can connect me through
santosh.primetechsoftware@gmail.com
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How does asp page work?
witch is the best insistute in sharpoint course.what abt future of share point course.
What is the significance of attaching a profile while creating a user?
What is the difference between cookie and session?
What is asp according to you?
Explain the use of resource manager class in .net.
To redirect the user to another page which method do we use without performing a round trip to the client?
How does a web application session work?
What is an imagemap in asp.net?
What are the advantages and disadvantages of session?
What is redirectpermanent in asp.net?
Which platform does Microsoft .NET use for exchanging data between applications?
What is an axd file?
What is caching? Explain.
In a webservice, need to display 10 rows from a table. Which is the best choice among datareader or dataset?