AttentionThis page documents an earlier version. Go to the latest version.
Subscripted expression allows access to an element in a multi-element value such as a map collection by using operator
. Subscripted column expressions can be used when writing the same way as a column expression. For example, if
ids refers to a column of type
ids refers to the third element of the list
ids, which can be set in an UPDATE statement.
MAP, or user-defined data types.
LISTvalue with a non-positive index will yield NULL.
MAPvalue with a non-existing key will yield NULL. Otherwise, it returns the element value that is associated with the given key.
cqlsh:yugaspace> CREATE TABLE t(id INT PRIMARY KEY,yugamap MAP<TEXT, TEXT>);
cqlsh:yugaspace> UPDATE yugatab SET map_value['key_value'] = 'yuga_string' WHERE id = 7;