0

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.)

Joshua Pena
  • 79
  • 1
  • 10

3 Answers3

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
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