jeudi 27 août 2015

Two SQLite queries at one go

I have two queries:

SELECT word FROM dictionary WHERE lang = 'english' AND word LIKE 'k%' LIMIT 10;
SELECT word FROM dictionary WHERE lang = 'english' AND word LIKE 's%' LIMIT 10;

Because the database is huge, each query takes time. So, my question is that can I merge the above queries into one with a LIMIT of 5 each? If yes, then how to do it?

Any help is appreciated. Thanks.

Aucun commentaire:

Enregistrer un commentaire