Computer Science
Which SQL function is used to count the number of rows in a SQL query ?
- COUNT()
- NUMBER()
- SUM()
- COUNT(*)
SQL Joins & Grouping
3 Likes
Answer
COUNT(*)
Reason — The SQL function COUNT(*) is used to count the number of rows in an SQL query, including duplicates and rows with NULL values.
Answered By
2 Likes
Related Questions
Where and Having clauses can be used interchangeably in SELECT queries ?
- True
- False
- Only in views
- With order by
The operation whose result contains all pairs of tuples from the two relations, regardless of whether their attribute values match.
- Join
- Cartesian product
- Intersection
- Set difference
Which of the following is not an aggregate function ?
- Avg
- Sum
- With
- Min
All aggregate functions except …………… ignore null values in their input collection.
- Count(attribute)
- Count(*)
- Avg
- Sum