Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the _COUNT column for?

Tags:

android

Android specifies the super-handy _id column in the BaseColumns interface, usage of which is very well explained in this question, but what is _count for? Count of rows in a directory, what directory?

public interface BaseColumns
{
    /**
     * The unique ID for a row.
     * <P>Type: INTEGER (long)</P>
     */
    public static final String _ID = "_id";

    /**
     * The count of rows in a directory.
     * <P>Type: INTEGER</P>
     */
    public static final String _COUNT = "_count";
}
like image 961
Maarten Avatar asked Dec 21 '13 18:12

Maarten


People also ask

What is CSS column-count?

The column-count CSS property breaks an element's content into the specified number of columns.

How do I count a column value in Excel?

Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers. For example, you can enter the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20). In this example, if five of the cells in the range contain numbers, the result is 5.


1 Answers

As said in this tutorial:

Every provider can also report the number of records returned as the _COUNT column; its value is the same for all rows.

Here is an example result set for the query in the previous section:

_ID  _COUNT   NAME           NUMBER
44   3        Alan Vain      212 555 1234
13   3        Bully Pulpit   425 555 6677
53   3        Rex Cars       201 555 4433 
like image 152
Maarten Avatar answered Oct 31 '22 02:10

Maarten