Hi,
I use MsSQL 7.0
I have got easy table MyTable (order by NAME):
ID NAME AGE
-----------------
4 Boris 26
2 John 22
5 John 24 <---
3 John 23
1 Kevin 25
...
I would like retrieve 10 rows by SELECT statement, where first row has NAME = JOHN AND ID = 5.
SELECT TOP 10 * FROM MyTable WHERE NAME >= 'John' ORDER BY NAME
it's OK, but my first row is John with ID = 2, of course.
How do I do it ?
Thanks, radim
I use MsSQL 7.0
I have got easy table MyTable (order by NAME):
ID NAME AGE
-----------------
4 Boris 26
2 John 22
5 John 24 <---
3 John 23
1 Kevin 25
...
I would like retrieve 10 rows by SELECT statement, where first row has NAME = JOHN AND ID = 5.
SELECT TOP 10 * FROM MyTable WHERE NAME >= 'John' ORDER BY NAME
it's OK, but my first row is John with ID = 2, of course.
How do I do it ?
Thanks, radim