SQL Tutorial will guide us another arithmetic function is COUNT. This allows us to COUNT up the number of row in a certain table. The syntax
for this key work COUNT statement is as under.
For example, if we want to find the number of employees entries in our table,
Table
Employees
| FirstName |
LastName |
Email |
DOB |
Phone |
| Austin |
Hennery |
austin.it@gamail.com |
24/11/1978 |
446 102-2222 |
| Creston |
Narvon |
narvon_crest@hotmail.com |
22/04/1976 |
443 325-4545 |
| Kate |
Bladen |
kbladen@usa.net |
01/05/1980 |
326 503-3232 |
| Angela |
Hennery |
julieee@yahoo.co.uk |
11/12/1977 |
326 323-8888 |
| Bobbi |
Ferguson |
bobi123@kiwibox.com |
10/02/1970 |
506 252-9875 |
| Cute |
Alfa |
cafa@gmail.com |
19/05/1972 |
506 272-4566 |
Because the Last name of two employees Austin and Angela are same that's whey
the last result is 5 even we have 6 records in our table of Employees the SQL
Distinct key word show the unique recodes in a table. Hope this section of
SQL Tutorial coves the all needs for learning SQL Count And SQL Distinct
Statements.