To return the number of rows in a query,we use COUNT. It counts the numbers of records.
the syntax of SQL COUNT statement.
SELECT COUNT (expression)
FROM tables
WHERE conditions;
SQL SELECT COUNT(column_name)
SELECT COUNT(name) FROM employee _table;
It will return the total number of names of employee_table. But null fields will not be counted.
SQL SELECT COUNT(*)
SELECT COUNT(*) FROM employee_table;
used to return the number of records in table.
0 Comment(s)