问题
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.
回答1:
It depends on what kind of data you want put into a BLOB. Let's consider the table:
create table b1(id number , b blob);
If your data represented as hex-string you should use TO_BLOB function
insert into 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
来源:https://stackoverflow.com/questions/23380823/how-to-insert-blob-datatype-values-in-oracle-11g-database-through-sqlplus