Книги автора: Beginning Android
Книга: Beginning Android
Regular Queries
Regular Queries
The query()
method takes the discrete pieces of a SELECT
statement and builds the query from them. The pieces, in the order they appear as parameters to query()
, are as follows:
1. The name of the table to query against
2. The list of columns to retrieve
3. The WHERE
clause, optionally including positional parameters
4. The list of values to substitute in for those positional parameters
5. The GROUP BY
clause, if any
6. The ORDER BY
clause, if any
7. The HAVING
clause, if any
These can be null
when they are not needed (except the table name, of course):
String[] columns = {"ID", "inventory"};
String[] parms = {"snicklefritz"};
Cursor result = db.query("widgets", columns, "name=?",
parms, null, null, null);
Оглавление статьи/книги
Похожие страницы
- Regular Expressions
- Raw Queries
- Granting System Administrator Privileges to Regular Users
- SQL Subqueries
- Chapter 8 Strings and Regular Expressions
- 3.2.6 Regular Expressions for Search and Replacement Operations
- 5.2.6.4 Using regular expressions to choose files
- 11.3.2.5 Regular expression operator summary
- Making Queries
- 11.3.2 Regular Expressions
- 11.3.4 Functions That Use Regular Expressions
- Table E-7. Regular expression search commands