2021年3月28日星期日

How do I get the rows between two conditions in an sql table?

say I have a table like this

number      status  ----------------------   1          g   2          a   3          b   4          c   5          d   6          e   7          f   8          b   9          e   10         a   11         c   12         f   13         g   14         d   15         a  

I want to get all the rows from a to f (but not f to a) so that the resultant object is like this. How do I do this? Thanks!

number      status  ----------------------   2          a   3          b   4          c   5          d   6          e   7          f   10         a   11         c   12         f  
https://stackoverflow.com/questions/66848281/how-do-i-get-the-rows-between-two-conditions-in-an-sql-table March 29, 2021 at 11:03AM

没有评论:

发表评论