I developed an application for Java applications using H2 (Embedded). I just have basic knowledge of the database, so I just installed H2 and created the name of the RecordAutomation schema, and then added tables to this schema. Now I am trying to use the ON DUPLICATE KEY UPDATE function for a specific table that does not work, giving sql syntax error, I check my query, I found it correctly, given below
INSERT INTO RECORDAUTOMATION.MREPORT (PRODUCTID ,DESCRIPTION ,QUANTITY ,SUBTOTAL ,PROFIT ) VALUES (22,olper,5,100,260) ON DUPLICATE KEY UPDATE SET QUANTITY = QUANTITY+5;
i and try to solve this problem where it is discussed, since this function does not work for tables other than the default values. I have no idea about default and non-default. Please help me
source share