# insert/update BLOB on ORACLE DB

**URL:** <https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786>\
**Category:** General Discussion\
**Created:** [January 9, 2012, 5:11pm UTC](https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786 "2012-01-09T17:11:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 9, 2012, 5:11pm UTC](https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786/1 "2012-01-09T17:11:00Z")

</div>

Hi,

could you tell me about possible way - how to insert/update BLOB on ORACLE DB?

Could I use some extension?&nbsp;

I saw some discussion on your forum but I didn’t see right way how to do it.&nbsp;

In the case when insert BLOB isn’t possible: Could you tell me how to integrate modul for it?

Thanks

Standa

---

<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:** [January 9, 2012, 5:11pm UTC](https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786/2 "2012-01-09T17:11:00Z")

</div>

Inserting or updating isn’t directly supported by oracle currently. If oracle has a syntax for inserting/updating via SQL without using parameters you can use that in liquibase since it just passes the SQL as given into the JDBC driver.&nbsp;

If oracle requires using parameters through JDBC to insert/update blobs, you’ll have to write a custom extension ([liquibase.org/extensions](http://liquibase.org/extensions)) to read data from a file and pass it into a PreparedStatement directly

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 9, 2012, 5:11pm UTC](https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786/3 "2012-01-09T17:11:00Z")

</div>

Could you give me short example how to do it by extensions?

Thanks&nbsp;

Standa

---

<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:** [January 9, 2012, 5:11pm UTC](https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786/4 "2012-01-09T17:11:00Z")

</div>

Bart, is your code somewhere that the original asker could look at for reference?  
  
Nathan

---

<div class="post-metadata">

**Author:** ![bart.cappon](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@bart.cappon](https://forum.liquibase.org/u/bart.cappon)\
**Post date:** [January 9, 2012, 5:11pm UTC](https://forum.liquibase.org/t/insert-update-blob-on-oracle-db/1786/5 "2012-01-09T17:11:00Z")

</div>

In fact, it is supported: but the value should be entered in hex in the changeSet.  
  
Also there is a limitation in size you can use over an INSERT statement, and, the syntax might be different for different databases. E.g. 0x or x at the start of the BLOB value.  
  
This all can be resolved: See [http://forum.liquibase.org/#Topic/49382000000395001](http://forum.liquibase.org/#Topic/49382000000395001) for more information
