I have a fifteen-column table in my database.
and I have a key which has a quality of auto-increment.
What I want to do is.. check if the table has a column with the key and insert if exist, else update.
I applied SQL syntax which I found here to my code.. but it never works.
here's the sample code below.
insert into report (col1, col2, col3.......col14) values ('value1','value2', ....'value14')
ON DUPLICATE KEY UPDATE col1=values('changedValue1'), col2=values('changedValue2')....col14=values('changedValue14');
I excuted this code in Mybatis, but it returns MySQLSyntaxErrorException..