关于oracle的CLOB类型的字段使用存储过程的问题

Posted by 猪头小队长 | 程序设计 | Tuesday 21 September 2004 18:40
在Oracle中,如果字段的类型是CLOB(不知道其他类似类型是否也是如此),那么在使用存储过程的时候,将参数声明为Varchar2格式,那么在调用存储过程的时候可以直接传入String类型的参数。
例如:
CREATE OR REPLACE PROCEDURE SP_CreateTemplate(
p_Template IN VARCHAR2,
p_out OUT NUMBER
)
这里p_Template的类型其实是CLOB,但是在这里写成了Varchar2之后,那么调用的时候,可以:
stmt.setString(1, "this is a template");

[@more@]

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.