KnowledgeBoat Logo
|

Informatics Practices

With SQL, how can you return the number of not null records in the Project field of "Students" table ?

  1. SELECT COUNT(Project) FROM Students
  2. SELECT COLUMNS(Project) FROM Students
  3. SELECT COLUMNS(*) FROM Students
  4. SELECT COUNT(*) FROM Students

SQL Queries

1 Like

Answer

SELECT COUNT(Project) FROM Students

Reason — The COUNT() function in SQL counts the number of non-null records in a column. By using COUNT(Project), we are counting the number of rows where the Project column is not null in the student table.

Answered By

2 Likes


Related Questions