Cassandra CQL Introduction

Category: Cassandra   Tags: Cassandra, Learning, Beginners, Basics, NoSQL Database, Cassandra CQL

Cassandra Query Language (CQL) is a query language for the Cassandra database. CQL shell (cqlsh) is used to interact with Cassandra. You can create keyspaces and tables, insert and query tables and other cassandra related operations.

Starting cqlsh on Linux and Mac OS X

  1. Go to the Cassandra installation directory.
  2. Start cqlsh:
                                               $ bin/cqlsh
                                            
  3. To start cqlsh on a different node you need to provide IP address and port:
                                              $ bin/cqlsh 10.12.35.40 9042
                                            

Starting cqlsh on Windows

  1. Go to the Cassandra installation directory.
  2. Start cqlsh:
                                               C:\> cqlsh
                                            
    cqlsh prompt appears as cqlsh>
  3. To start cqlsh on a different node you need to provide IP address and port:
                                              C:\> cqlsh 10.12.35.40 9042