Cassandra Query Language (CQL)

Cassandra Query Language (CQL) is the native query language of Apache Cassandra®. You can use CQL to interact with DataStax Astra DB, Hyper-Converged Database, DataStax Enterprise, and Cassandra databases. CQL syntax is similar to SQL, but includes key differences to interact with distributed, non-relational data.

CQL includes both Data Definition Language (DDL) and Data Manipulation Language (DML) commands. DDL commands are used to create, alter, and drop keyspaces, tables, and other database objects. DML commands are used to insert, update, delete, and query data in tables. Each database product supports a slightly different set of CQL commands.

Use CQL

You can use a variety of tools to execute CQL commands:

  • The CQL shell is a command-line interface that lets you interact with the database using CQL commands. The Astra Portal has an embedded CQL shell.

  • DataStax drivers let you execute CQL commands in a variety of programming languages.

  • DataStax Studio lets you run CQL commands and visualize the results in self-documenting notebooks.

The following table lists the CQL tools that are compatible with each database product:

Database Embedded CQL shell cqlsh DataStax drivers DataStax Studio

Astra DB

check

check

check

check

HCD

check

check

check

DSE

check

check

check

Cassandra

check

check

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com