用SQL语句怎样将多媒体文件插入到数据库中?????
解决方案 »
- 本人2月14日大婚,接受祝福,800分全部散尽,普天同贺~~~!!!
- oracle 乱码
- 请问在oracle触发的执行动作中,可不可以执行DDL操作?请大家帮我看看,我里面的问题吧。谢谢。
- 怎么写工具检查.dat文件里面是不是有重复的数据
- 关于多级级联多对多关联数据表结构设计
- 求教sql*loader 插数据!急啊
- sql查询语句
- Oracle8i安装完后,如何进行数据库的配置
- 在linux安装oracle时忘装中文字符集了,我该怎么办
- oracle8i内容如何导入到8.05里面
- 高分相送,Oracle Database Configuation Asssistant点击后没任何反应?
- 今天开机的头一个问题
http://expert.csdn.net/expert/topic/580/580137.xml
grant create any directory to scott;
grant create any library to scott;
create or replace directory utllobdir as 'G:\oracle';
create table bfile_tab (bfile_column BFILE);
create table utl_lob_test (blob_column BLOB);set serveroutput on然后执行下面语句就将G:\oracle目录下的Azul.jpg存入到utl_lob_test
表中的blob_column字段中了。
declare
a_blob BLOB;
a_bfile BFILE := BFILENAME('UTLLOBDIR','Azul.jpg');
begin
insert into bfile_tab values (a_bfile)
returning bfile_column into a_bfile;
insert into utl_lob_test values (empty_blob())
returning blob_column into a_blob;
dbms_lob.fileopen(a_bfile);
dbms_lob.loadfromfile(a_blob, a_bfile, dbms_lob.getlength(a_bfile));
dbms_lob.fileclose(a_bfile);
commit;
end;
/
select dbms_lob.getlength(blob_column) from UTL_LOB_TEST;