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

前端 未结 1 1863
迷失自我
迷失自我 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)
提交回复
热议问题