SQLite COUNT function


  Translation results:

count

英[kaʊnt] 美[kaʊnt]

n.Total number; Count; Count; Arguments

v. Count ;Calculate the total; include...;Important

SQLite COUNT functionsyntax

Function:SQLite COUNT aggregate function is used to count the number of rows in a database table.

Syntax: sqlite> SELECT count(*) FROM TABLENAME;

SQLite COUNT functionexample

COMPANY 表

ID          NAME        AGE         ADDRESS     SALARY
----------  ----------  ----------  ----------  ----------
1           Paul        32          California  20000.0
2           Allen       25          Texas       15000.0
3           Teddy       23          Norway      20000.0
4           Mark        25          Rich-Mond   65000.0
5           David       27          Texas       85000.0
6           Kim         22          South-Hall  45000.0
7           James       24          Houston     10000.0


实例:sqlite> SELECT count(*) FROM COMPANY;

结果:
count(*)
----------
7

Popular Recommendations

Home

Videos

Q&A