In SQL Server the simplest method is to use "SELECT TOP 10 * FROM MYTABLENAME".
There are lots of ways to select first desired record or row from a database table. Here are some example SQL statements
That doesn't require additional application logic, but each database server requires different SQL syntax.
SELECT ROWNUM,column1,column2,column3
FROM table_name
WHERE ROWNUM
That doesn't require additional application logic, but each database server requires different SQL syntax.
SELECT ROWNUM,column1,column2,column3
FROM table_name
WHERE ROWNUM
Select * from fetch first 10 rows only.
This is the query can be used when your database is DB2 .
This is the query can be used when your database is DB2 .
In sql table define some primary key as emp_code
select * from tablename where emp_code between range1 and range2
select * from tablename where emp_code between range1 and range2