# update column with empty string sets a \<null\> value (trunk)

**URL:** <https://forum.liquibase.org/t/update-column-with-empty-string-sets-a-null-value-trunk/915>\
**Category:** General Discussion\
**Created:** [November 10, 2010, 4:25pm UTC](https://forum.liquibase.org/t/update-column-with-empty-string-sets-a-null-value-trunk/915 "2010-11-10T16:25:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eike\_kettner](https://avatars.discourse-cdn.com/v4/letter/e/67e7ee/32.png) [@eike\_kettner](https://forum.liquibase.org/u/eike_kettner)\
**Post date:** [November 10, 2010, 4:25pm UTC](https://forum.liquibase.org/t/update-column-with-empty-string-sets-a-null-value-trunk/915/1 "2010-11-10T16:25:00Z")

</div>

Hi,

We use empty strings in our database and whle searching the forum I found some threads that discussed this topic. So now, we use the current trunk version and the insert statements (and defaultValues) are [correctly] set to empty strings instead of .

But when I use the update tag, still is used and not the empty string.

Example:

?xml version="1.0" encoding="UTF-8"?\>

\<databaseChangeLog xmlns=“[http://www.liquibase.org/xml/ns/dbchangelog”](http://www.liquibase.org/xml/ns/dbchangelog%22) xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%22) xsi:schemaLocation=“[http://www.liquibase.org/xml/ns/dbchangelog](http://www.liquibase.org/xml/ns/dbchangelog) [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd”\>](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd%22>)

&nbsp;

&nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp;

&nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp;   
&nbsp;

is converted to

UPDATE mytable SET label = NULL;

INSERT INTO mytable (label) VALUES (’’);

I’d say those two tags should behave the same, shouldn’t they? Is there any “workaround” or other path that lets me update a column with an empty string?

Thanks in advance

Regards,  
Eike

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [November 10, 2010, 4:25pm UTC](https://forum.liquibase.org/t/update-column-with-empty-string-sets-a-null-value-trunk/915/2 "2010-11-10T16:25:00Z")

</div>

Yes, they should work the same.&nbsp; I fixed update to allow the insertion of empty strings and will just insert null for the string “null”.&nbsp;

If you do not want to build a new version yourself or wait for the next release, you can use the tag for now.

Nathan

---

<div class="post-metadata">

**Author:** ![eike\_kettner](https://avatars.discourse-cdn.com/v4/letter/e/67e7ee/32.png) [@eike\_kettner](https://forum.liquibase.org/u/eike_kettner)\
**Post date:** [November 10, 2010, 4:25pm UTC](https://forum.liquibase.org/t/update-column-with-empty-string-sets-a-null-value-trunk/915/3 "2010-11-10T16:25:00Z")

</div>

Hi Nathan,

thank you very much for the fast reply and fix!

Eike
