mercredi 28 janvier 2015

SQLite substr function in WHERE expression

Suppose I have 'employee' table with 'lname' column


I am interested in fetching all rows, where second character can be either 'e' or 'o'


What i am doing wrong, this query doesnt return anything:



SELECT * FROM employee WHERE (substr(lname,2,3)='e' OR substr(lname,2,3)='o');

Aucun commentaire:

Enregistrer un commentaire