I have the following table:
q) t:([s:`symbol$()] id:();id2:`int$())
where 's' is the primary key, and 'id' col is of a common type. I am trying to understand the following behavior when inserting a list (row in this example) into the "id" column:
a) Upsert works, but Insert failed
q) `t insert (`a;"gg";4) // 'type q) `t upsert (`a;"gg";4) // works
b) The insert requires that the primary key also be credited:
q)`t insert (`a;enlist "gg";4) // 'length q)`t insert (enlist `a;enlist "gg";4) // works
What is going on behind the scenes?
database insert primary-key kdb
Rahul
source share