PL/SQL (MOSC)

MOSC Banner

To insert images into Oracle Table .

edited Jul 4, 2019 9:50AM in PL/SQL (MOSC) 16 commentsAnswered ✓

Dear Team ,

I have created one table named " SV_EMP_PHOTO" having one BLOB column . Below is the script .

create table SV_EMP_PHOTO

(

  ID                     NUMBER(3) NOT NULL,

  PHOTO_NAME  VARCHAR2(40),

  PHOTO_RAW    BLOB,

  EMP_NAME     VARCHAR2(80)

) ;

One directory is also created in the database (i.e srdev1 ) under the path '/oracle/u01/home/applmgr/empphoto' . There I put three .jpg file which I want to store in the table "SV_EMP_PHOTO" .

----- Procedure for inserting images ...

CREATE OR REPLACE PROCEDURE sv_load_image (

   p_id           NUMBER

, p_emp_name     IN   VARCHAR2

, p_photo_name   IN   VARCHAR2

)

IS

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center