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

前端 未结 1 1850
迷失自我
迷失自我 2021-01-03 18:02

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

相关标签:
1条回答
  • 2021-01-03 18:48

    You can do

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

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

    0 讨论(0)
提交回复
热议问题