HOME
ACADEMY
DOCS
CONTACT US
DOWNLOAD DATASTAX
GLOSSARY
SUPPORT
DEVELOPER BLOGS
This document is
no longer maintained
.
CQL for Apache Cassandra 3.0
Introduction to Cassandra Query Language
CQL data modeling
Data modeling concepts
Data modeling analysis
Using materialized views
Understanding materialized views
Known limitations
Creating a materialized view
Altering a materialized view
Dropping a materialized view
Best practices
FAQ
Using CQL
Starting cqlsh on Linux and Mac OS X
Creating and updating a keyspace
Example of creating a keyspace
Updating the replication factor
Creating a table
Creating a table
Using the keyspace qualifier
Simple Primary Key
Composite Partition Key
Compound Primary Key
Creating a counter table
Create table with COMPACT STORAGE
Migrating from compact storage
Table schema collision fix
Creating advanced data types in tables
Creating collections
Creating a table with a tuple
Creating a user-defined type (UDT)
Creating functions
Creating user-defined function (UDF)
Creating User-Defined Aggregate Function (UDA)
Inserting and updating data
Inserting simple data into a table
Inserting and updating data into a set
Inserting and updating data into a list
Inserting and updating data into a map
Inserting tuple data into a table
Inserting or updating data into a user-defined type (UDT)
Inserting JSON data into a table
Using lightweight transactions
Sharing a static column
Expiring data with time-to-live
Batching data insertion and updates
Batching inserts, updates and deletes
Good use of BATCH statement
Misuse of BATCH statement
Querying tables
Retrieval and sorting results
Retrieval using collections
Retrieval using JSON
Retrieval using the IN keyword
Retrieval by scanning a partition
Retrieval using standard aggregate functions
Retrieval using a user-defined function (UDF)
Retrieval using user-defined aggregate (UDA) functions
Querying a system table
Indexing
When to use an index
Using a secondary index
Using multiple indexes
Indexing a collection
Altering a table
Altering columns in a table
Altering a table to add a collection
Altering the data type of a column
Altering the table properties
Altering a user-defined type
Removing a keyspace, schema, or data
Dropping a keyspace or table
Deleting columns and rows
Dropping a user-defined function (UDF)
Securing a table
Database roles
Database Permissions
Database users
Tracing consistency changes
Setup to trace consistency changes
Trace reads at different consistency levels
How consistency affects performance
Displaying rows from an unordered partitioner with the TOKEN function
Determining time-to-live (TTL) for a column
Determining the date/time of a write
Legacy tables
Working with legacy applications
Querying a legacy table
Using a CQL legacy table query
CQL reference
Introduction
CQL lexical structure
Uppercase and lowercase
Escaping characters
Valid literals
Exponential notation
CQL code comments
CQL Keywords
CQL data types
Blob type
Collection type
Counter type
UUID and timeuuid types
UUID and timeuuid functions
Timestamp type
Tuple type
User-defined type
Functions
CQL limits
CQL shell commands
Starting cqlsh
Configuring cqlsh from a file
CAPTURE
CLEAR
CONSISTENCY
COPY
DESCRIBE
cqlshExpand
EXIT
LOGIN
PAGING
SERIAL CONSISTENCY
SHOW
SOURCE
TRACING
CQL commands
ALTER KEYSPACE
ALTER MATERIALIZED VIEW
ALTER ROLE
ALTER TABLE
ALTER TYPE
ALTER USER
BATCH
CREATE AGGREGATE
CREATE INDEX
CREATE FUNCTION
CREATE KEYSPACE
CREATE MATERIALIZED VIEW
CREATE TABLE
CREATE TRIGGER
CREATE TYPE
CREATE ROLE
CREATE USER (Deprecated)
DELETE
DROP AGGREGATE
DROP FUNCTION
DROP INDEX
DROP KEYSPACE
DROP MATERIALIZED VIEW
DROP ROLE
DROP TABLE
DROP TRIGGER
DROP TYPE
DROP USER (Deprecated)
GRANT
INSERT
LIST PERMISSIONS
LIST ROLES
LIST USERS (Deprecated)
REVOKE
SELECT
TRUNCATE
UPDATE
USE
Home
Academy
Docs home
Contact us
Download DataStax
Glossary
Support
Developer blogs
Search
Home
CQL reference
CQL commands
CQL commands
CQL commands.
This section describes the commands that are specific to CQL.
ALTER KEYSPACE
Changes keyspace replication and enable/disable commit log.
ALTER MATERIALIZED VIEW
Changes the table properties of a materialized view.
ALTER ROLE
Changes password, and set superuser or login options.
ALTER TABLE
Modifies the columns and properties of a table.
ALTER TYPE
Modify a user-defined type.
ALTER USER
Alter existing user options.
BATCH
Applies multiple data modification language (DML) statements with atomicity and/or in isolation.
CREATE AGGREGATE
Create user-defined aggregate.
CREATE INDEX
Define a new index on a single column of a table.
CREATE FUNCTION
Creates custom function that execute user provided code in Cassandra.
CREATE KEYSPACE
Define a new keyspace.
CREATE MATERIALIZED VIEW
Create a materialized view.
CREATE TABLE
Define a new table.
CREATE TRIGGER
Registers a trigger on a table.
CREATE TYPE
Create a customized collection, user-defined type (UDT).
CREATE ROLE
Create roles for access control to database objects.
CREATE USER (Deprecated)
Create a new user.
DELETE
Removes data from one or more columns or removes the entire row.
DROP AGGREGATE
Drop a user-defined aggregate.
DROP FUNCTION
Drop user-defined function (UDF).
DROP INDEX
Drop the named index.
DROP KEYSPACE
Remove the keyspace.
DROP MATERIALIZED VIEW
Remove the named materialized view.
DROP ROLE
Removes a role.
DROP TABLE
Remove the named table.
DROP TRIGGER
Removes registration of a trigger.
DROP TYPE
Drop a user-defined type.
DROP USER (Deprecated)
Remove a user.
GRANT
Defines resource authorization.
INSERT
Inserts an entire row or upserts data into existing rows.
LIST PERMISSIONS
Lists role 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.
REVOKE
Remove privileges on database objects from roles.
SELECT
Retrieve data from a Cassandra table.
TRUNCATE
Remove all data from a table.
UPDATE
Update columns in a row.
USE
Connects the client session to a keyspace.
CQL reference
Introduction
CQL lexical structure
CQL data types
Functions
CQL limits
CQL shell commands
CQL commands
ALTER KEYSPACE
ALTER MATERIALIZED VIEW
ALTER ROLE
ALTER TABLE
ALTER TYPE
ALTER USER
BATCH
CREATE AGGREGATE
CREATE INDEX
CREATE FUNCTION
CREATE KEYSPACE
CREATE MATERIALIZED VIEW
CREATE TABLE
CREATE TRIGGER
CREATE TYPE
CREATE ROLE
CREATE USER (Deprecated)
DELETE
DROP AGGREGATE
DROP FUNCTION
DROP INDEX
DROP KEYSPACE
DROP MATERIALIZED VIEW
DROP ROLE
DROP TABLE
DROP TRIGGER
DROP TYPE
DROP USER (Deprecated)
GRANT
INSERT
LIST PERMISSIONS
LIST ROLES
LIST USERS (Deprecated)
REVOKE
SELECT
TRUNCATE
UPDATE
USE