Intellipaat Back

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

Can anyone tell me how to use count in SQL?

1 Answer

0 votes
by (119k points)

Count() function is used to count the number of rows that matches the specific condition. Here is a syntax to use Count() function in SQL:

SELECT COUNT (ColumnName)
FROM TableName
WHERE condition(s);

For example, if you wish to find the number of employees whose salary is less than 25000

SELECT COUNT(*)

FROM Employee

where salary < 25000

If you wish to learn SQL, then sign up for this SQL course by Intellipaat that comes with instructor-led training and hands-on experience.

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
0 votes
1 answer
asked May 4, 2020 in SQL by Sudhir_1997 (55.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...