Skip to Main Content
  • Questions
  • extract image from a blob and store locally

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: April 28, 2016 - 10:52 am UTC

Last updated: April 28, 2016 - 3:13 pm UTC

Version: Oracle 11g

Viewed 10K+ times! This question is

You Asked

Hi,

We have Oracle 11g installed on a Unix server
I have a table temp_photo
Name Null Type
---------- -------- ------------
ID NOT NULL NUMBER(3)
PHOTO_NAME VARCHAR2(50)
PHOTO BLOB

I have inserted a .jpg file into the BLOB.
I now need to create a PL/SQL procedure to extract the data from the BLOB and store the file on my local drive.
Can anyone please help?
Your help would be very much appreciated

and Connor said...

Here's an example that does pretty much exactly what you are after

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:232814159006



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

CLOB/BLOB/etc

Complete documentation on Securefiles and Large Objects here