'How do I select rows where a column value starts with a certain string?

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.".



Solution 1:[1]

You can do

select * from mytable where name like "Mr.%"

See http://www.sqlite.org/lang_expr.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Denys Séguret