user2187935 user2187935 - 11 months ago 102
SQL Question

Update one row in the table, using 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>

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.

Thank you

Answer Source

Yes it is possible. See the below syntax:

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

More info at Liquibase Update

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download