一个非常简单的Spring应用程序,可以使用不同的DataSources运行。在其中,我有一个liquibase变更集,它涉及到这个sql:
<sql>
UPDATE home_description hd
INNER JOIN home h ON
hd.id = h.description_id
SET hd.home_id = h.id
</sql>
虽然这条语句在MySQL数据库上运行得很好,但它在PostgreSQL上却不起作用。
这是一个例外:
Error: org.postgresql.util.PSQLException: ERROR: syntax error at or near "INNER"
Position: 46
liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "INNER"
有没有办法重写这条语句,让MySQL和PostgreSQL都接受呢?谢谢!
转载请注明出处:http://www.jndeho.com/article/20230526/1876761.html