使用liquibase更新表中的一行 [英] Update one row in the table, using liquibase

查看:57
本文介绍了使用liquibase更新表中的一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有人可以验证这是否是使用liquibase填充数据库的正确语法和正确方法吗?全部,我想要的是更改表中一行的值,而我这样做是这样的:

I was hoping if someone could verify if this is the correct syntax and correct way of populating the DB using liquibase? All, I want is to change value of a row in a table and I'm doing it like this:

<changeSet author="name" id="1231">
<update tableName="SomeTable">
    <column name="Properties" value="1" />
    <where>PROPERTYNAME = 'someNameOfThePropery"</where>
</update>
<changeSet>

我想要做的就是在某个表中的一行中更改一个值.上面的方法不起作用,尽管应用程序已编译并且没有抱怨,但是可惜,它的值没有改变.

All I want is to change one value in a row in some table. The above doesn't work, although application compiled and it didn't complain, but alas, the value wasn't changed.

谢谢

推荐答案

是可以的.请参见以下语法:

Yes it is possible. See the below syntax:

<changeSet author="name" id="1231">
    <update catalogName="dbname"
            schemaName="public"
            tableName="SomeTable">
        <column name="Properties" type="varchar(255)"/>
        <where>PROPERTYNAME = 'someNameOfThePropery'</where>
    </update>
</changeSet>

更多信息,请访问 Liquibase更新

这篇关于使用liquibase更新表中的一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆