Sunday 2 February 2020

Cassandra: LIMIT: Limit number of records returned from a query

You can limit number of records returned from a query using LIMIT keyword.

For example below statement selects only 2 records.
SELECT * FROM cassandratutorial.employee LIMIT 2

cqlsh> SELECT * FROM cassandratutorial.employee LIMIT 2;

 id | age | firstname | lastname
----+-----+-----------+----------
  1 |  30 |   Krishna |   Gurram
  2 |  31 |       Ram |   Gurram

(2 rows)

Previous                                                    Next                                                    Home

No comments:

Post a Comment