• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

CQL for DSE

  • Overview
    • Cassandra structure
    • About CQL
    • CQL quick reference
    • Known issues
  • Getting started
    • Vector Search Quickstart
    • CQL Quickstart
    • SAI Quickstart
    • DSE Search Indexing Quick Start
  • Planning
    • Data modeling
      • Data modeling concepts
      • Data modeling analysis
  • Connecting
    • cqlsh (startup options)
      • Accessing data using CQL
        • Starting the standalone cqlsh tool
        • Starting cqlsh
    • Developing
      • Introduction to CQL
      • Managing keyspaces
        • Keyspace concepts
        • Create a keyspace
        • Check a keyspace
        • Alter a keyspace
        • Drop a keyspace
      • Managing tables
        • Table concepts
        • Data types
        • Create a table
        • Check a table
        • Alter a table
        • Truncate a table
        • Drop a table
      • Managing columns
        • Managing columns
        • Create a table column
        • Check column existence
        • Alter a table column
        • Drop a column
        • User-defined type (UDT) overview
          • Create a user-defined type (UDT)
          • Check for user-defined type (UDT) existence
          • Alter a user-defined type (UDT)
          • Drop a user-defined type (UDT)
        • User-defined functions (UDFs) and user-defined aggregates (UDAs) overview
          • Create a user-defined function (UDF)
          • Check a user-defined function (UDF)
          • Drop a user-defined function (UDF)
          • Create a user-defined aggregate function (UDA)
          • Checking a user-defined aggregate (UDA)
          • Drop a user-defined aggregate (UDA)
      • Managing Materialized views
        • Materialized views concepts
        • Known limitations of materialized views
        • Create a materialized view (MV)
        • Alter a materialized view (MV)
        • Drop a materialized view
        • Frequently asked questions about materialized views
      • Indexing Tables
        • Indexing concepts
        • Storage-Attached Indexing (SAI) Overview
          • SAI concepts
          • SAI Quickstart
          • SAI FAQ
          • Create SAI index
          • Alter SAI index
          • Drop SAI index
          • Querying with SAI
          • Configure SAI indexes
          • Monitor SAI indexes
          • SAI write path and read path
        • Secondary indexes (2i) overview
          • Secondary index (2i) concepts
          • When to use an index
          • Building and maintaining secondary indexes (2i)
          • Create a secondary index (2i)
            • Create a 2i on a collection column
          • Check secondary index (2i) existence
          • Alter a secondary index (2i)
          • Drop a secondary index (2i)
        • Search indexes overview
          • Search index commands
          • Adjusting timeout for index management
          • Creating a search index
          • Configuring search index joins
          • Joining cores
          • Reloading the search index
          • Removing a search index
          • Managing search index fields
            • Syntax for changing schema settings
            • Search index schema field types
            • Adding a new field type
            • Adding a column to the index
            • Indexing tuples and UDTs fields
              • Tuple configuration example
              • UDT configuration example
              • Nesting tuples and UDTs
              • Tuples and UDTs as CQL map values
            • Indexing map columns
            • Indexing a column for different analysis
            • Dropping columns from the index
          • Updating the index after data expires (TTL)
          • Inserting, updating, and deleting data
          • Search indexing examples
        • Search index examples
          • Search index examples
            • Creating a demo keyspace for tutorials
            • Indexing and querying polygons
      • Inserting and updating data
        • Insert simple data
        • Set column
        • List fields
        • Map fields
        • Tuple
        • User-defined type (UDT) column
        • Insert static data
        • UUID and timeuuid column
        • Date column
        • Time column
        • Timestamp column
        • Duration column
        • Update counter
        • Lightweight transactions (LWTs)
        • Inserting JSON formatted values
        • Batching inserts and updates
          • Batching inserts, updates, and deletes
          • Good use of BATCH statement
          • Misuse of BATCH statement
        • Importing data from a CSV file
        • Setting the time-to-live (TTL) for value
          • Inserting, updating, and deleting data
      • Deleting data
        • Deleting values from a column or entire row
        • Expiring data with time-to-live
        • Expiring data with TTL example
      • Querying and retrieving data
        • Using a SELECT statement
        • Restricting queries using WHERE clauses
          • Partition keys
          • Clustering columns
          • Retrieval using the IN keyword
          • Sorting and limiting results
        • Returning data from collection columns
        • Aggregating results
        • Using user-defined functions (UDF)
        • Applying user-defined aggregate (UDA) functions
          • Testing performance impact using tracing
        • Formatting query results as JSON
        • Retrieving the write timestamp
        • Using tracing
          • Tracing performance
        • DSE Search index querying
        • Search index filtering best practices
          • Search index syntax
          • search-index:si-query-syntax.adoc#siIndexedColumns
          • search-index:si-query-syntax.adoc#basicSolrSyntax
          • search-index:si-query-syntax.adoc#queriesJSON
          • search-index:si-query-syntax.adoc#siEscapeCharacters
        • Native CQL search queries
        • Identifying the partition key
        • Filtering on terms
          • Filtering on words, phrases, or substrings
          • Fuzzy search
        • UDT query examples
        • Querying a CQL collection set
        • Using date ranges in solr_query
        • Geospatial queries for Point and LineString
        • Spatial queries with polygons require JTS
        • Using dynamic fields
        • Limiting results and paging
        • Restricted query routing
    • Securing overview
      • Security quickstart
      • Using cqlsh with authentication
      • System tables for authentication and authorization
  • Cycling Examples
    • Setting up the cycling keyspace
    • User-defined types (UDTs)
      • basic_info
      • basic_info_withTTL
      • fullname
      • race
    • User-defined functions (UDFs) and user-defined aggregates (UDAs)
      • flog
      • left
      • average_state
      • average_final
      • Cycling user-defined aggregate team_average
    • Tables
      • birthday_list
      • calendar
      • comments
      • country_flag
      • cyclist_alt_stats
      • cyclist_base
      • cyclist_career_teams
      • cyclist_category
      • cyclist_emails
      • cyclist_expenses
      • cyclist_id
      • cyclist_name
      • cyclist_points
      • cyclist_races
      • cyclist_sponsors
      • cyclist_stats
      • cyclist_teams
      • events
      • popular_count
      • race_sponsors
      • race_starts
      • race_times
      • race_winners
      • rank_by_year_and_name
      • team_average
      • upcoming_calendar
    • Materialized views (MVs)
      • cyclist_by_age-mv
    • Search indexes
      • Search index examples
      • comments search index
    • SASI indexes
      • Index on cyclist_name
    • Access control
      • Cycling internal
    • Cycling queries
      • Aggregating cycling data
    • Reference
      • CQL quick reference
      • Understanding the CQL command syntax
      • Data types
        • Creating a blob column
        • Date, time, and timestamp format
        • Solr field type reference for DSE Search
      • Operators
      • CQL native functions
      • CQL native aggregates
      • System and virtual tables
        • System tables
          • Keyspace tables
          • Querying system tables
          • Functions, aggregates, and user types
        • Virtual tables
          • Virtual keyspaces and tables
          • Virtual tables for SAI indexes and SSTables
      • cqlsh (startup options)
        • Configuring a cqlshrc file
        • Starting cqlsh on a search node
      • CQL shell (cqlsh) reference
        • CAPTURE
        • CLEAR
        • CONSISTENCY
        • COPY TO
        • COPY FROM
        • DESCRIBE AGGREGATE
        • DESCRIBE CLUSTER
        • DESCRIBE SCHEMA
        • DESCRIBE FUNCTION
        • DESCRIBE INDEX
        • DESCRIBE KEYSPACE
        • DESCRIBE MATERIALIZED VIEW
        • DESCRIBE SEARCH INDEX
        • DESCRIBE TABLE
        • DESCRIBE TYPE
        • EXECUTE AS
        • EXPAND
        • EXIT
        • LOGIN
        • PAGING
        • SERIAL CONSISTENCY
        • SHOW
        • SOURCE
        • TIMING
        • TRACING
      • CQL commands
        • ALTER KEYSPACE
        • ALTER MATERIALIZED VIEW
        • ALTER ROLE
        • ALTER SEARCH INDEX CONFIG
        • ALTER SEARCH INDEX SCHEMA
        • ALTER TABLE
        • ALTER TYPE
        • ALTER USER (Deprecated)
        • BATCH
        • COMMIT SEARCH INDEX
        • CREATE AGGREGATE
        • CREATE CUSTOM INDEX
        • CREATE FUNCTION
        • CREATE INDEX
        • CREATE KEYSPACE
        • CREATE MATERIALIZED VIEW
        • CREATE ROLE
        • CREATE SEARCH INDEX
        • CREATE TABLE
        • CREATE TYPE
        • CREATE USER (Deprecated)
        • DELETE
        • DROP AGGREGATE
        • DROP FUNCTION
        • DROP INDEX
        • DROP KEYSPACE
        • DROP MATERIALIZED VIEW
        • DROP ROLE
        • DROP SEARCH INDEX
        • DROP TABLE
        • DROP TYPE
        • DROP USER (Deprecated)
        • GRANT
        • INSERT
        • LIST PERMISSIONS
        • LIST ROLES
        • LIST USERS (Deprecated)
        • REBUILD SEARCH INDEX
        • RELOAD SEARCH INDEX
        • RESTRICT
        • RESTRICT ROWS
        • REVOKE
        • SELECT
        • TRUNCATE
        • UNRESTRICT
        • UNRESTRICT ROWS
        • UPDATE
        • USE
  • CQL for DSE
  • Reference
  • CQL commands
Edit this Page

Commands

This section describes the Cassandra Query Language (CQL) commands supported by the DataStax Enterprise database.


ALTER KEYSPACE

Changes keyspace replication strategy and enables or disables commit log.

ALTER MATERIALIZED VIEW

Changes the table properties of a materialized view.

ALTER ROLE

Changes password and sets superuser or login options.

ALTER SEARCH INDEX CONFIG

Changes a search index for DSE Search configuration.

ALTER SEARCH INDEX SCHEMA

Changes a search schema for DSE Search.

ALTER TABLE

Modifies the columns and properties of a table, or modify

ALTER TYPE

Modifies an existing user-defined type (UDT).

ALTER USER (Deprecated)

Deprecated. Alter existing user options.

BATCH

Applies multiple data modification language (DML) statements with atomicity and/or in isolation.

COMMIT SEARCH INDEX

Updates the search index with the most recent data after an INSERT, UPDATE, or DELETE.

CREATE AGGREGATE

Defines a user-defined aggregate.

CREATE CUSTOM INDEX

Creates a storage-attached index.

CREATE FUNCTION

Creates custom function to execute user provided code.

CREATE INDEX

Defines a new index for a single column of a table.

CREATE KEYSPACE

Defines a new keyspace.

CREATE MATERIALIZED VIEW

Optimizes read requests and eliminates the need for multiple write requests by duplicating data from a base table.

CREATE ROLE

Creates a cluster wide database object used for access control.

CREATE SEARCH INDEX

Defines a new search index for an existing table.

CREATE TABLE

Creates a new table.

CREATE TYPE

Creates a custom data type in the keyspace that contains one or more fields of related information.

CREATE USER (Deprecated)

Deprecated. Creates a new user.

DELETE

Removes data from one or more columns or removes the entire row

DROP AGGREGATE

Deletes a user-defined aggregate from a keyspace.

DROP FUNCTION

Deletes a user-defined function (UDF) from a keyspace.

DROP INDEX

Removes an index from a table.

DROP KEYSPACE

Removes the keyspace.

DROP MATERIALIZED VIEW

Removes the named materialized view.

DROP ROLE

Removes a role.

DROP SEARCH INDEX

Drops a table search index.

DROP TABLE

Removes the table.

DROP TYPE

Drop a user-defined type.

DROP USER (Deprecated)

Removes a user.

GRANT

Allow access to database resources.

INSERT

Inserts an entire row or upserts data into existing rows.

LIST PERMISSIONS

Lists permissions on resources.

LIST ROLES

Lists roles and shows superuser and login status.

LIST USERS (Deprecated)

Lists existing internal authentication users and their superuser status.

REBUILD SEARCH INDEX

Rebuilds a search index for DSE Search.

RELOAD SEARCH INDEX

Replaces the active search index schema and configuration with pending schema and configuration.

RESTRICT

Denies the permission on a resource, even if the role is directly granted or inherits permissions.

RESTRICT ROWS

Configures the column used for row-level access control.

REVOKE

Removes privileges on database objects from roles.

SELECT

Returns data from a table.

TRUNCATE

Removes all data from a table.

UNRESTRICT

Removes a restriction from a role.

UNRESTRICT ROWS

Removes the column definition for row-level access control.

UPDATE

Modifies one or more column values to a row in a table.

USE

Selects the keyspace for the current client session.

TRACING ALTER KEYSPACE

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

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

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.

landing_page landingpage