Is there a query where I could get the next record from this table? (for example I will query to get the 'For Assignment' but instead I want the 'Assigned' to be the output.)
Asked
Active
Viewed 33 times
3 Answers
0
Try this
select * from table_name where stepID = (select min(stepID) from table_name where stepID > 1)

Shadow Fiend
- 1,829
- 1
- 9
- 14
-
Thank you but I already fixed it. I'll just mark this as the answer later. – Joshua Pena Aug 31 '17 at 03:45
0
You can use limit and offset to select the row.
Refer this one https://stackoverflow.com/a/16606/1294870

NIrav Modi
- 6,038
- 8
- 32
- 47
0
You can get next record using this:
- SELECT * FROM tbl WHERE stepID > 2 ORDER BY id LIMIT 1
Hope this will help you!

Geee
- 2,217
- 15
- 30