Tuple data type is a fixed-length sets of typed positional fields. Use a tuple as an alternative to user-defined type(UDT). A Tuple can accommodate many fields(32768). When we create a table, for tuple datatype use angle brackets and a comma delimeter for the commponent types. Unlike other “composed” types (collections and UDT), a tuple is always frozen (without the need of the frozen keyword) and it is not possible to update only some elements of a tuple (without updating the whole tuple). Also, a tuple literal should always have the same number of value than declared in the type it is a tuple of (some of those values can be null but they need to be explicitly declared as so).

Example

Creating table student with tuple data type

the output

Inserting Data for tuple value

Result

Filtering using tuple value

when we filtering use tuple data type use keyword ALLOW FILTERING or creating index on column tuple.
example

Tuple support nested tuple

Update Data on Tuple

a tuple is always frozen (without the need of the frozen keyword) and it is not possible to update only some elements of a tuple (without updating the whole tuple).