Public final Cursor query (Uri URI, string[] projection,string selection,string[] Selectionargs, Stringsortorder)
The first argument, the URI is a unique identifier used to identify the provider to be accessed
The second argument, projection, tells the provider what to return (column columns of course, you can only display name when printed below, because the result you return does not include an ID.)
Returns all the contents of the provider, in columns column, with NULL.
The third parameter, selection, sets the condition, which is equivalent to where in the SQL statement. Null means no filtering is performed. To obtain a name equal to Zhang San, use "= ' Zhang San '" instead
Fourth parameter, Selectionargs, this parameter is to be used with the third parameter, if the third parameter is set to have? , then the data written in Selectionargs will be replaced?? It's actually a placeholder, and it's easy to understand that it's written in a SQL statement.
The fifth parameter, SortOrder, is sorted by what, equivalent to the order by in the SQL statement. You can set the "DESC" "ASC"; the default is ascending
Ascending, in fact the default sort is ascending, + "ASC" does not write the same effect: