How to obtain number of rows in Cassandra table

Yes, you can use COUNT(*). Here’s the documentation.

A SELECT expression using COUNT(*) returns the number of rows that matched the query. Alternatively, you can use COUNT(1) to get the same result.

Count the number of rows in the users table:

SELECT COUNT(*) FROM users;

Leave a Comment