Subscripted expressions
Use subscripted expressions to access elements 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 LIST
, ids[7]
refers to the third element of the list ids
, which can be set in an UPDATE statement.
Examples
ycqlsh:yugaspace> CREATE TABLE t(id INT PRIMARY KEY,yugamap MAP<TEXT, TEXT>);
ycqlsh:yugaspace> UPDATE yugatab SET map_value['key_value'] = 'yuga_string' WHERE id = 7;