SQL query in Android - search for whole or part of a string

后端 未结 2 586
梦谈多话
梦谈多话 2021-01-24 09:36

I\'m not experienced with SQL queries too much so I\'m having some trouble in finding the solution to my problem.

I have a list of Bookmarks, for example: Facebook, Deve

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-24 09:57

    You can use the SQL-keyword LIKE for this. Encapsulate it with the wildward (%) and you're way to go.

    sqlite> select * from testtable where name like '%face%';
    facebook|42
    

提交回复
热议问题