Skip to content Skip to sidebar Skip to footer

How To Insert Blob Datatype Values In Oracle 11g Database Through Sql*plus

I have created a table with Blob datatype but I do not know how to insert values into the table or view the table content using SQL*Plus. Please help me.

Solution 1:

It depends on what kind of data you want put into a BLOB. Let's consider the table:

createtable b1(id number , b blob);

If your data represented as hex-string you should use TO_BLOB function

insertinto b1 values(1,to_blob('FF3311121212EE3a'));

SQLPLUS also shows BLOBs as hex-string

select*from b1;

----- -----------------------------------
   ID                                   B
----- -----------------------------------1 FF3311121212EE3A

Please refer Oracle documentation on Using LOBs

Post a Comment for "How To Insert Blob Datatype Values In Oracle 11g Database Through Sql*plus"