Alexandre S.
Alexandre S.

Reputation: 540

Update a user-defined type column in cql 5.1

I want to update a row in my table which contains a user-defined type column. So, i did a query for this :

update test set identifiers = identifiers + {id : 'test1', cat_name : 'test1'} where id = 1;

Here is my table test :

CREATE TABLE public.test ( id int PRIMARY KEY, identifiers frozen<identifier> )

Thank you in advance

Upvotes: 0

Views: 1004

Answers (1)

Andan Patil
Andan Patil

Reputation: 21

Put Squire brackets before flower brackets. It will add new row to the existing one. As shown below.

update test set identifiers = identifiers +[{id :'test1',cat_name:'test1'}] where id = 1

Upvotes: 2

Related Questions