| Author |
SQL question
|
Max Harding
Greenhorn
Joined: Aug 24, 2002
Posts: 2
|
|
|
What would be the proper SQL statement to use if I wanted to access the 11th row of a table without any comparison to data in that particular row?
|
 |
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
|
|
|
You can access the 11th record in a result set by just looping thru the resultset and increment a counter till you reach 11.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
Jamie Robertson
Ranch Hand
Joined: Jul 09, 2001
Posts: 1879
|
|
If you are using Oracle, you can do something like "select id, name from ( select rownum as row_num_col, id, name from emp ) where row_num_col = 11" To find the rownumber in a database is database specific, so the above may not work on any other platform. Jamie
|
 |
 |
|
|
subject: SQL question
|
|
|