Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain what is count(*) in SQL?

1 Answer

0 votes
by (119k points)
edited by

In SQL, count (*) does not take parameters and returns the total number of rows in a particular table. The difference between COUNT (*) and COUNT (ALL) is that COUNT (*) also counts NULL values and duplicates but COUNT (ALL) does count only unique and non-null values.

The following SQL query returns the total number of employees from the employee table:

SELECT COUNT (*)

FROM Employee;

If you want to learn SQL from Industry experts then register for this best SQL courses by Intellipaat that provides Instructor-led training, hands-on experience, and certification

Related questions

0 votes
2 answers
asked May 5, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked May 5, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked May 3, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Apr 22, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...