var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to fetch limited record from DB (SQL Server)
I have 20,000 records in a table, and i want to retrieve only 1- 20 records from the table.How can v specify the range.
we can achieve this in oracle using the ROWNUM like the follwing query.
"select * from tblPerson where ROWNUM>1 and ROWNUM<20".
Is there any way to get the same in SQL Server7.0.
If possible, please let me know.
I guess your back ground is Oracle..
There are two ways to do this in Sql Server:
1. Set Rowcount 20
Select * from tblperson
2. Select Top 20 * from tblperson
Hope it helps
Set Rowcount 20
changes behavior of your connection. Now all can do max 20 operations in each select,update,....
Do not forget to clean up by
Set Rowcount 0