Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Cassandra: Aliases in SELECT statements


CQL support Aliases in SELECT statement using AS keyword.

Example
cqlsh> SELECT * FROM cassandratutorial.employee;

id | age | firstname | lastname
----+-----+-----------+----------
1 | 30 | Krishna | Gurram
2 | 31 | Ram | Gurram
3 | 45 | Vijay | Ponnam

(3 rows)

You specify column name aliases using AS clause like below.

SELECT id AS empId, firstname as empName FROM cassandratutorial.employee;



This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Cassandra: Aliases in SELECT statements

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×