开发者

Choosing selected section from an SQLite database

开发者 https://www.devze.com 2023-03-30 03:10 出处:网络
I have a database in which I have a column in which each row contain开发者_StackOverflows either \"true\" or \"false\". Is it possible for a cursor to only select the rows which have the value \"true\

I have a database in which I have a column in which each row contain开发者_StackOverflows either "true" or "false". Is it possible for a cursor to only select the rows which have the value "true" in that column. How would you write the database query to get that?

Thanks


SELECT your_column, other_col
FROM your_table
WHERE your_column = ?

Can be used with a rawQuery()-method, which will replace the ? with your value to prevent you from SQL-injections.

0

精彩评论

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