首页 > 解决方案 > Liquibase Failed SQL: (933) 在 Oracle 中插入数据时出错

问题描述

我是 Liquibase 的新手,我目前正在尝试将我们现有的 Sql 脚本迁移到Liquibase sql changesheet

尝试通过 Liquibase 执行以下插入语句时:

-- liquibase formatted sql

-- changeset authentic:DATA-CORE-NEW-1 splitStatements:false
INSERT INTO TABLE_A (COL_1,COL_2,COL_3,COL_4,COL_5,COL_6) VALUES (789,67,1,'Backslash','\',CURRENT_TIMESTAMP);
--rollback DELETE FROM TABLE_A

我收到以下错误:

Unexpected error running Liquibase: Migration failed for change set 
install/DATA/CORE/new_DATA.sql::DATA-CORE-NEW-1::axx2323:
    Reason: liquibase.exception.DatabaseException: ORA-00933: SQL command not properly ended
    [Failed SQL: (933) INSERT INTO TABLE_A (COL_1,COL_2,COL_3,COL_4,COL_5,COL_6) VALUES (789,67,1,'Backslash','\',CURRENT_TIMESTAMP);]
For more information, please use the --logLevel flag

我怀疑问题出在“\”(反斜杠)字符上。我尝试将 '\' 更改为 '\\' 但没有奏效,我遇到了同样的错误。

我的 Liquibase 版本是:版本 4.2.2 #36

注意:我不想更改变更表的格式,因为我有太多的变更表,并且更改格式会花费太多时间。

谁能帮我解决这个问题。

标签: liquibaseoracle19c

解决方案


推荐阅读