title: H2 database Merge into based on one column
body: <p>I want to update or insert into this table dataTime if the loginId already exists else insert</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS UserLastActivity 
  (
      id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
      loginId VARCHAR(500) NOT NULL,
      dataTime BIGINT NOT NULL,
  );
  </code></pre>
  
  <p>First attempt:</p>
  
  <pre><code>MERGE INTO UserLastActivity KEY(loginId) VALUES(#{loginId}, #{dataTime})
  </code></pre>
  
  <p>For the above statement I get exception stating number of columns mismatch</p>
  
  <p>Second attempt:</p>
  
  <pre><code>MERGE INTO UserLastActivity KEY(loginId) (loginId, dataTime)
  VALUES(#{loginId}, #{dataTime})
  </code></pre>
  
  <p>I get exception </p>
  
  <blockquote>
    <p>Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "MERGE INTO USERLASTACTIVITY KEY(LOGINID) (LOGINID[*], DATATIME) VALUES(?, ?) "; expected "(, SELECT, FROM"; SQL statement:</p>
  </blockquote>