vendredi 25 mars 2016

Sqlite fetch a particular value not present within the specified limit

I have a table Customer which has the following columns,

user_name,current_id,id,params,display,store.

I am writing a query like this,

SELECT * FROM Customer WHERE user_name='Mike' AND current_id='9845' AND id='Get_Owner' AND params='owner=1' order by(display) limit 6 offset 0

Now there are times when I want to fetch a particular value which is not there in the first six and I want to fetch that particular value and rest 5 values in the same way like above how can I do that?

For example I want something like this

SELECT * FROM Customer WHERE user_name='Mike' AND current_id='9845' and id='Get_Owner' AND params='owner=1' AND stored='Shelly.Am'

I want Shelly.Am and other 5 value like my first query

Aucun commentaire:

Enregistrer un commentaire