You have to skip VARCHAR in your upsert statement: upsert into cross_id_attributes (crossId, id1, id2) values ('crossIdvalue','id1Value','id2Value')
Sent from my iPhone On 30 Aug 2015, at 22:38, Serega Sheypak <serega.shey...@gmail.com<mailto:serega.shey...@gmail.com>> wrote: Hi, Getting error which confuses me. Here is DDL: CREATE TABLE IF NOT EXISTS cross_id_attributes ( crossId VARCHAR NOT NULL CONSTRAINT cross_id_reference_pk PRIMARY KEY (crossId) ) Here is upsert query: upsert into cross_id_attributes(crossId VARCHAR, id1 VARCHAR, ,id2 VARCHAR)values('crossIdvalue','id1Value','id2Value') And exception is: Number of columns upserting must match number of values. Numbers of columns: 4. Number of values: 3 What does it mean? I have three cols and 3 values