How to declare a variable and mysql update in liquibase

前端 未结 2 1029
温柔的废话
温柔的废话 2021-01-20 06:40

I want to write the following sql code in liquibase

set @value1 = \"string1\"; set @value2 = \"string2\";

update users set category = REPLACE(category, @valu

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-20 07:02

    The @value syntax is part of the MySQL SQL editor tools and not actually understood by the database itself so liquibase is not able to take advantage of them.

    Liquibase does support similar functionality with changelog paramaters using the syntax ${value}

提交回复
热议问题