Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select everything after a certain row in ordered SQL Table

I have a query that selects a bunch of rows from various tables and orders them alphabetically based on a single field (Fruit), but I want to only start selecting after a certain value is reached. Is there anyway of doing this in MS Access SQL?

Eg:

If the value is Cherry and the table, ordered alphabetically, looks like:

**Fruit:**

Apple

Banana

Cherry

Damson

Orange

--

Then I just want to select Cherry, Damson and Orange. (Sorry I couldn't think of a fruit beginning with E)

Thanks for your help in advance!

like image 840
Ben Elgar Avatar asked Mar 13 '12 09:03

Ben Elgar


1 Answers

Most operators can also be applied to text fields, so in your example you could use:

SELECT  *
FROM    Fruit
WHERE   FruitName >= 'Cherry'
like image 197
GarethD Avatar answered Sep 23 '22 05:09

GarethD