How to count all unique records in the SQL table?
How to count all unique records in the SQL table?
Jr. Software Developer
I am a software developer at MindStick soft. Pvt. ltd. I joined this company in august 2021 after completing my post-graduation course. I love to see the historical places of my country.
We can count all unique records in a table using the DISTINCT keyword in conjunction with the COUNT() aggregate function.
The DISTINCT keyword in a query retrieves different and non-repeating values.
The COUNT() function returns the number of rows selected by a query.