How do I select rows where a column value starts with a certain string ?
For example, I'd like to select the rows whose 'name' column starts with "Mr.".
To select rows using selection symbols for character or graphic data, use the LIKE keyword in a WHERE clause, and the underscore and percent sign as selection symbols. You can create multiple row conditions, and use the AND, OR, or IN keywords to connect the conditions.
You can do
select * from mytable where name like "Mr.%"
See http://www.sqlite.org/lang_expr.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With