一般情況下
具體示例
首先
create table test (id INTEGER
然後插入空值
String strSql =
con
//創建並實例化一個CLOB對象
CLOB clob = new CLOB((OracleConnection)con)
clob = oracle
//對CLOB對象賦值
clob
OracleConnection OCon = (OracleConnection)con
OraclePreparedStatement pstmt = (OraclePreparedStatement)OCon
pstmt
int i = pstmt
pstmt
mit()
OCon = null
con = null
Boolean flag = true
if(i <=
{
flag = false
}
if (flag == true)
{
out
}
else
{
out
求
}
注意
一定不要忘記引入包
針對CLOB字段的修改除了SQL語句外其他和插入相同
String strSql =
con
//創建並實例化一個CLOB對象
CLOB clob = new CLOB((OracleConnection)con)
clob = oracle
//對CLOB對象賦值
clob
OracleConnection OCon = (OracleConnection)con
OraclePreparedStatement pstmt = (OraclePreparedStatement)OCon
pstmt
int i = pstmt
pstmt
mit()
OCon = null
con = null
Boolean flag = true
if(i <=
{
flag = false
}
if (flag == true)
{
out
}
else
{
out
(
self
}
From:http://tw.wingwit.com/Article/program/Oracle/201311/16796.html