Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse

H2

Versions

  • 1.2.137 and later

Default Driver

  • org.h2.Driver

Sql Script Syntax

Compatibility

  • DDL exported by H2 can be used unchanged in a Flyway migration.
  • Any H2 sql script executed by Flyway, can be executed by the h2 tools (after the placeholders have been replaced).

Example

/* Single line comment */
CREATE TABLE test_data (
 value VARCHAR(25) NOT NULL PRIMARY KEY
);

/*
Multi-line
comment
*/

-- Sql-style comment

-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
INSERT INTO test_user (name) VALUES ( $$'Mr. Semicolon+Linebreak;
another line'$$);

Limitations

Hsql