Notice: Constant WP_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 107

Notice: Constant WP_MAX_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 108
CQL READ Data - CodesJava

CodesJava

Easy learning with example program codes

CQL READ Data


Notice: Undefined variable: footnotelist in /home/javawith/public_html/codesjava.com/wp-content/plugins/latex2html/inc/core.php on line 475

To read data from a table in Cassandra, the SELECT command is used.
Syntax 1:

SELECT FROM <table_name>

Syntax 2: Using WHERE clause.

SELECT FROM <table name> WHERE <condition>;

Example 1:

SELECT * FROM employees;

Output:

id	name	salary
1	Adi	50000
2	Bruno	30000
3	Chris	60000
4	Davis	20000
5	Eliza	15000

Example 2:

SELECT id, name FROM employees;

Output:

id	name
1	Adi
2	Bruno
3	Chris
4	Davis
5	Eliza

Example 3:

SELECT * FROM employees 
WHERE id=3;

Output:

id	name	salary
3	Chris	60000
Please follow and like us:
error









Copyright © 2019 CodesJava DMCA.com Protection Status