SELECT COUNT FROM

This command is used to find the number of records in a data field (data column). It is useful when you are trying to update a database table and want to make sure the data has been transferred correctly. Let us look at the following table(tbl_employee)

Employee_id Last_ Name First_Name Address Zip_Code
10010 Mitchel John 1223 West Palm Beach Rd 85023
10011 Spencer Teri 2349 S. 76th Street #102 53219
10012 James Taylor 23 N. Atlantic Blvd 76215
10013 Pewinsky Lewis 675 E Indian School Rd 85023
10014 James Sue 3567 E Tatum Blvd 85032

 

SELECT COUNT (Employee_id) FROM tbl_employee

will return 5

 

Back to the homepage