Merge query in H2 is showing error that null is not allowed.
I have an apple table with 4 columns : id,type,name,status...where id and type cannot be null (ID being the primary key).
I am merging data of two columns "name , status" using merge command...
Merge Into Apple(ID,Name,status)
key (ID)
select ID,Name,Status from Fruit ;
It gives an error showing null is not allowed for column "type".
I dont know where it is going wrong.I have just one entry in apple table which contains a valid "id" and "type" already.
My fruits table does not have a type column and neither am I including it in the query then why is it showing problem with that particular column???