Javatpoint Logo
Javatpoint Logo

Cassandra READ Data

SELECT command is used to read data from Cassandra table. You can use this command to read a whole table, a single column, a particular cell etc.

Syntax:

Example:

Let's take an example to demonstrate how to read data from Cassandra table. We have a table named "student" with columns (student_id, student_fees student_name)


Read the whole table using SELECT command

Cassandra Read date 1

Read Particular Columns

This example will read only student_name and student_id from the student table.

Cassandra Read date 2

Use of WHERE Clause

WHERE clause is used with SELECT command to specify the exact location from where we have to fetch data.

Syntax:

Note: WHERE clause can be used only on the columns that are a part of primary key or have a secondary index on them.

Example:

Cassandra Read date 3
Next TopicCQL update data




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA