开发者

SQLiteDatabase select rows where column is equal something

开发者 https://www.devze.com 2023-04-08 01:49 出处:网络
I have a SQLiteDatabase and I want to select the rows where one of the row\'s column is equal to a text. I know to do this with inte开发者_开发知识库ger but I don\'t know how to do this with text. And

I have a SQLiteDatabase and I want to select the rows where one of the row's column is equal to a text. I know to do this with inte开发者_开发知识库ger but I don't know how to do this with text. And I would like to have more options as WHERE theColumn is equal a or b or c.


SELECT * FROM table WHERE theColumn IN ('text1', 'text2', 'text3')

Try to avoid selecting whole rows when not necessary. Also keep in mind string comparisons take longer than integer ones.

0

精彩评论

暂无评论...
验证码 换一张
取 消