开发者

SQLiteDatabase select rows where column is equal something

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜