menu_open
Live Chat
home
Docs Home
Astra
expand_more
Astra DB Serverless
Astra Streaming
Astra CLI
Langflow
HCD
DSE
expand_more
DSE 6.9
DSE 6.8
DSE 5.1
DSE Capacity planning guide
OpsCenter 6.8
Third-party software
Supported Platforms
Product compatibility
Open Source
expand_more
Apache Cassandra
open_in_new
Apache Cassandra capacity planning guide
DataStax Apache Pulsar Connector
CDC for Apache Cassandra
K8ssandra
open_in_new
Kubernetes Autoscaling for Apache Pulsar
Kubernetes Operator for Apache Cassandra
Stargate
open_in_new
Starlight for JMS
Starlight for Kafka
Starlight for Rabbit MQ
Luna Support Services
expand_more
Luna for Apache Cassandra
Luna Streaming
Tools
expand_more
Mission Control
Migration
Drivers
DataStax Studio
CQL
Was this helpful?
thumb_up
Yes
thumb_down
No
Thank you for your feedback.
Give Feedback
ESC
close
How can we improve the documentation?
Cancel
Submit Feedback
CQL for DataStax Enterprise
DSE 6.8
expand_more
HCD 1.0 (Latest)
DSE 6.9
DSE 6.8
DSE 5.1
Cassandra 5.0
Astra DB
Overview
expand_more
Apache Cassandra structure
Get started
expand_more
Vector search quickstart
CQL quickstart
SAI quickstart
DSE Search indexing quickstart
Plan
expand_more
Data modeling
Data modeling concepts
Data modeling analysis
Connect
expand_more
cqlsh (startup options)
Accessing data using CQL
Starting the standalone cqlsh tool
Starting cqlsh
Develop
expand_more
Develop
Introduction to CQL
Keyspaces
expand_more
Keyspaces
Keyspace concepts
Create a keyspace
Check a keyspace
Alter a keyspace
Drop a keyspace
Tables
expand_more
Tables
Table concepts
Create a table
Check a table
Alter a table
Truncate a table
Drop a table
Columns
expand_more
Columns
Managing columns
Create a table column
Check column existence
Alter a table column
Drop a column
Collections
expand_more
Collections
Collection data types overview
Create a collection
Check a collection
Alter a collection
Drop a collection column
User-defined objects
expand_more
User-defined objects
UDTs
expand_more
UDTs
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)
UDFs
expand_more
UDFs
Create a user-defined function (UDF)
Check a user-defined function (UDF)
Drop a user-defined function (UDF)
UDAs
expand_more
Create a user-defined aggregate function (UDA)
Checking a user-defined aggregate (UDA)
Drop a user-defined aggregate (UDA)
Materialized Views
expand_more
Materialized views
Materialized views concepts
Known limitations of materialized views
Materialized views (MVs) examples
Create a materialized view (MV)
Alter a materialized view (MV)
Drop a materialized view
Frequently asked questions about materialized views
Indexes
expand_more
Indexes
Indexing concepts
Building and maintaining secondary indexes
SAI
expand_more
Storage-Attached Indexing (SAI)
SAI concepts
SAI quickstart
SAI examples
Create SAI index
Check SAI existence
Alter SAI index
Drop SAI index
Query with SAI
Configure SAI indexes
Monitor SAI indexes
SAI FAQ
2I
expand_more
Secondary indexing (2i)
2i concepts
2i examples
Create 2i index
Check 2i existence
Alter 2i index
Drop 2i index
Query with 2i
SASI
expand_more
SSTable-Attached Indexing (SASI)
SASI concepts
Create SASI index
Check SASI existence
Alter SASI index
Drop SASI index
Query with SASI
Configure SASI indexes
DSE Solr Search
expand_more
DSE Search indexing
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
Fields
expand_more
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
Insert
expand_more
Insert and update data
Insert simple data
Set column
List column
Map column
Tuple column
User-defined type (UDT) column
Date column
Time column
Timestamp column
Duration column
UUID and timeuuid column
Counter column
Static column
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
Inserting data from a CSV file
expand_more
Importing data from a CSV file
Setting the time-to-live (TTL) for value
Inserting, updating, and deleting data
Delete
expand_more
Delete data
Deleting values from a column or entire row
Expiring data with time-to-live
Expiring data with TTL example
Query
expand_more
Querying and retrieving data
Querying
Using tracing
Testing performance impact using tracing
Tracing performance
SI querying
expand_more
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
Secure
expand_more
Secure
Configure authentication and authorization
Security quickstart
Using cqlsh with authentication
System tables for authentication and authorization
Cycling Examples
expand_more
keyspace-cycling-alt
keyspace-cycling
keyspace-test
materialized-view-cyclist-base
query-system-schema
roles
sstable-tasks-desc
table-basic-info-ttl-expire
table-birthday
table-calendar
table-check
table-comments-vs-dse68
table-comments-vs
table-comments
table-country-flag
table-cyclist-alt-stats
table-cyclist-base-ext
table-cyclist-base
table-cyclist-career-teams
table-cyclist-category
table-cyclist-emails
table-cyclist-expenses
table-cyclist-id
table-cyclist-name
table-cyclist-points
table-cyclist-races
table-cyclist-semi-pro
table-cyclist-sponsors
table-cyclist-stats
table-cyclist-teams
table-events
table-geospatial
table-lastname-bio
table-mechanic
table-mixed-case
table-nation-rank
table-numbers
table-popular-count
table-popular
table-race-results
table-race-sponsors
table-race-starts
table-race-times-summary
table-race-times
table-race-winners
table-rank-by-year-and-name
table-route
table-sample-times
table-team-average
table-team-race-time
table-test-average-state
table-upcoming-calendar
table-uppercase
user-defined-aggregate-average
user-defined-function-flog
user-defined-function-left
user-defined-type-basic-info-expire
user-defined-type-basic-info
user-defined-type-fullname
user-defined-type-race
users
Reference
expand_more
Reference
CQL quick reference
CQL command syntax
DATA TYPES
expand_more
Data types
Date, time, and timestamp format
UUIDs and TimeUUIDs
Solr field type reference for DSE Search
Arithmetic operators
CQL native functions
CQL native aggregates
System and virtual tables
expand_more
Keyspace tables
Querying system tables
Functions, aggregates, and user types
Virtual keyspaces and tables
Virtual tables for SAI indexes and SSTables
CQLSH TOOL
expand_more
cqlsh (startup options)
Configuring a cqlshrc file
Starting cqlsh on a search node
CQLSH COMMANDS
expand_more
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
expand_more
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 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 ROLE
GRANT PERMISSION
INSERT
LIST PERMISSIONS
LIST ROLES
LIST USERS (Deprecated)
REBUILD SEARCH INDEX
RELOAD SEARCH INDEX
RESTRICT
RESTRICT ROWS
REVOKE ROLE
REVOKE PERMISSION
SELECT
TRUNCATE
UNRESTRICT
UNRESTRICT ROWS
UPDATE
USE
home
DataStax Home
menu_book
Glossary
support
Support
downloading
Downloads