--插入内容 declare p_contentclob clob; amount number; begin amount:=length(p_content); select content into p_contentclob from newscontent where newsid=p_newsid for update; dbms_lob.write(p_contentclob,amount,1,p_content); commit; end;
这里的p_content在存储过程里是什么类型的,我用的是p_content in NVARCHAR2。看的例子是直接字符串写进来的。 [解决办法] 所有的数据库在用clob/blob、nclob时,直接存和取只能适用很小的资料,而定义为这几种类似就是为了存储大数据,正确用法是使用GetChars/getBytes [解决办法]