问题描述
我想在liquibase中编写以下sql代码
set @ value1 ="string1";设置@ value2 ="string2";
更新用户设置类别= REPLACE(类别,@ value1,@ value2);
如何在Liquibase中以xml或sql文件形式编写此代码?
@value语法是MySQL SQL编辑器工具的一部分,数据库本身并未真正理解它,因此liquibase无法利用它们. >
Liquibase确实使用语法$ {value} changelog参数支持类似的功能
I want to write the following sql code in liquibase
set @value1 = "string1";set @value2 = "string2";
update users set category = REPLACE(category, @value1, @value2);
How to write this in liquibase either in xml or in sql file?
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}
这篇关于如何在liquibase中声明变量和mysql更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!