Skip to content
Advertisement

sql syntax error with liquibase using join tables

I am using liquibase, and I have a sql script:

My script works fine with mysql. But my java program run on a hsql database. For me this script should work also for hsqldb because it is a pure sql syntax. But I am getting this error:

liquibase.exception.DatabaseException: unexpected token: INNER required: SET

Advertisement

Answer

HyperSQL database does not implement joins in the UPDATE statement. See HSQLDB Update Statement.

You’ll need to rephrase that query.

The equivalent valid query in HyperSQL would probably something like:

Assumming the subquery is a “scalar subquery” it should work. Scalar means that the query returns at most one row. Otherwise, you’ll need to aggregate it.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement