In: Computer Science
Consider the following data.
| 
 STUDENT  | 
||||
| 
 StudentID  | 
 SName  | 
 Gender  | 
 Age  | 
 ClubID  | 
| 
 3234  | 
 Alfred Smith  | 
 Male  | 
 20  | 
 BSK  | 
| 
 2244  | 
 McJohnson Robert  | 
 Male  | 
 22  | 
|
| 
 2389  | 
 Jessica Low  | 
 Female  | 
 20  | 
 JPA  | 
| 
 4211  | 
 Roland Devingo  | 
 Male  | 
 24  | 
|
| 
 4383  | 
 Jane Usa Khan  | 
 Female  | 
 21  | 
 BKY  | 
| 
 4450  | 
 Elaine Fong  | 
 Female  | 
 20  | 
 JPA  | 
| 
 CLUB  | 
|||
| 
 ClubID  | 
 CName  | 
 Founded  | 
 Budget  | 
| 
 BKY  | 
 Bakery Club  | 
 2010  | 
 2546  | 
| 
 PDC  | 
 Photomedia and Design  | 
 2005  | 
 1345  | 
| 
 JPA  | 
 Japanese Anime  | 
 2009  | 
 3453  | 
| 
 BSK  | 
 Basketball  | 
 2011  | 
 6744  | 
What is the value returned by this SQL statement?
SELECT COUNT( CLUBID )
FROM STUDENT
Given "STUDENT" table :
| STUDENTID | SNAME | Gender | Age | ClubID | 
| 3234 | Alfred Smith | Male | 20 | BSK | 
| 2244 | McJohnson Robert | Male | 22 | |
| 2389 | Jessica Low | Female | 20 | JPA | 
| 4211 | Roland Devingo | Male | 24 | |
| 4383 | Jane Usa Khan | Female | 21 | BKY | 
| 4450 | Elaine Fong | Female | 20 | JPA | 
Given SQL statement as :
SELECT COUNT( CLUBID ) FROM STUDENT
Answer : By executing above SQL statement ,the output is as below :
COUNT( CLUBID ) - - - - - - - - - - - - - - - - - - 4
Explanation : In given SQL statement, the COUNT() function with column name is used. It counts and returns the numbers of rows in a particular column from the given table.