SQL COUNT() function | Get length of rows in a table

Date Published: 30/07/2020 Published By: JaiSchool

A table 'students' that has some rows in it (table image is given below). How many rows this table have? I want to know that. So I will use SQL COUNT() function.

sql table for count column

For this, SQL provides a COUNT() function. With the help of that, we can get the total number of rows.

SQL Count() function example

SELECT COUNT(*) FROM students;

Publish A Comment

Leave a Reply

Your email address will not be published. Required fields are marked *