Group Discounts available for 3+ students and Corporate Clients

CQL Datatypes in Cassandra

The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear implacability and proven fault-tolerance on commodity hardware or cloud infrastructure make it the perfect platform for mission-critical data. Cassandra’s support for replicating across multiple data centers is best-in-class, providing lower latency for your users and the peace of mind of knowing that you can survive regional outages.

CQL provides a rich set of built-in data types, including collection types. Along with these data types, users can also create their own custom data types.

These core tutorials will help you to learn the CQL Datatypes in Cassandra . For an in-depth understanding and 
practical experience, explore Cassandra Training Online.

The following table provides a list of built-in data types available in CQL.

Data Types

Data TypeConstantsDescription
asciistringsRepresents ASCII character string
bigintbigintRepresents 64-bit signed long
blobblobsRepresents arbitrary bytes
BooleanbooleansRepresents true or false
counterintegersRepresents counter column
decimalintegers, floatsRepresents variable-precision decimal
doubleintegersRepresents 64-bit IEEE-754 floating point
floatintegers, floatsRepresents 32-bit IEEE-754 floating point
inetstringsRepresents an IP address, IPv4 or IPv6
intintegersRepresents 32-bit signed int
textstringsRepresents UTF8 encoded string
timestampintegers, stringsRepresents a timestamp
timeuuiduuidsRepresents type 1 UUID
uuiduuidsRepresents type 1 or type 4
varcharstringsRepresents uTF8 encoded string
varintintegersRepresents arbitrary-precision integer

Learn more about Cassandra Interview Questions in this blog post.

Collection Types

Cassandra Query Language also provides a collection data types. The following table provides a list of Collections available in CQL.

listA list is a collection of one or more ordered elements.
mapA map is a collection of key-value pairs.
setA set is a collection of one or more elements.

User-defined datatypes:

Cqlsh provides users a facility of creating their own data types. Given below are the commands used while dealing with user defined datatypes.

For an Indepth knowledge on Cassandra, click on below

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at, we will update the article in 24 hours.”

0 Responses on CQL Datatypes in Cassandra"

    Leave a Message

    Your email address will not be published. Required fields are marked *


    Please leave a message and we'll get back to you soon.
    Three + 6