menu_open
support_agent
Get Live Help
light_mode
dark_mode
home
Docs Home
Astra
expand_more
Astra DB Serverless
Astra Streaming
Astra CLI
Langflow
HCD
expand_more
HCD 1.0
HCD Capacity planning guide
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
CQL for Astra DB Serverless
Cycling Examples
keyspace-test
DESCRIBE KEYSPACE test;
DROP IF EXISTS KEYSPACE test;
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 Astra DB Serverless
Astra DB
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
About CQL
CQL quick reference
Known issues
Get started
expand_more
Vector Search Quickstart
CQL Quickstart
SAI 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
Check 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)
Indexes
expand_more
Indexes
Indexing concepts
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
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
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
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 TABLE
ALTER TYPE
ALTER USER (Deprecated)
BATCH
CREATE AGGREGATE
CREATE INDEX
CREATE TABLE
CREATE TYPE
CREATE USER (Deprecated)
DELETE
DROP INDEX
DROP TABLE
DROP TYPE
DROP USER (Deprecated)
GRANT ROLE
GRANT PERMISSION
INSERT
RESTRICT
REVOKE ROLE
REVOKE PERMISSION
SELECT
TRUNCATE
UNRESTRICT
UPDATE
USE
home
DataStax Home
menu_book
Glossary
support
Support
downloading
Downloads