create table lobdemo(key NUMBER KEY,clob_col CLOB,blob_col BLOB,bifle_col BFILE);
这个数据库第一列存储一个码,另外三列存储lob型数据。
(2)表建好以后,往表中插入一条数据:
insert into lobdemo(key,clob_col,blob_col,bfile_col) values (10,'abcdefghijklmnopqrsatuvwxyzasdffasfsdafsdafsdfadfsadfsdfsdfdsdsffds',empty_blob(),null);
create or replace procedure FileExec( p_Directory in VARCHAR2, p_Filename IN VARCHAR2 ) AS v_FileLocator BFILE; v_CLOBLocator CLOB; BEGIN --为update初始化一个定位符 SELECT clob_col INTO v_CLOBLocator FROM lobdemo WHERE key=-1 FOR UPDATE;