How can I simply filter a table row by alphabets for example showing only rows with strings starting with e,f and g and exclude other rows.
Something like
return (rows > "d") andalso (rows < "h")
in vb.net
you can use like if you want regular expression. for example, this will give you all rows starting with a:
select * from myTable where myColumn like 'a%';
EDIT:
I see what you mean now, mysql supports > and < for strings as well, so if you do:
where col >= 'e' and col < 'h'
you will essentially get everything starting by e,f,g
rows < h and rows > dlike someway I didn't know its possible simply by operators >= and <, and as I remember only like was strings comparing solution in mysql. Thanks anyway. This works.You can combine multiple LIKE operator saying
select * from table1
where mycol like 'e%'
or mycol like 'f%'
or mycol like 'g%';
(OR) you can use LEFT() string function saying
select * from table1
where left(mycol,1) in ('e','f','g');