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 do I use a proxy server when invoking a web service?
What are the new navigation controls in asp.net 2.0?
Why mvc is faster than asp.net? : Asp.Net MVC
What is viewstate information stored?
How do we assign page-specific attributes?
Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?
What is advantage of asp.net?
What is session mode in asp.net?
what is silver light when will we use silver light,
Can you explain architecture of your project ?
What is the difference between visual basic and asp.net?
Describe a Windows Service and its lifecycle ?
What is smpte vc-1?
How information about the user's locale can be accessed?
What is the adavantage of using ASP.NET routing?