SELECT DESCRIPTION,DETAILED_DESCRIPTION,PRIORITY,RISK_LEVE FROM Table_Name
该DETAILED_DESCRIPTION
列在CLOB
下面是用于获取数据的代码:但我在读取字段“DETAILED_DESCRIPTION”时收到错误“错误:读取错误”
Statement statement;
ResultSet resultSet;
oracleCon.setAutoCommit(false);
statement = oracleCon.createStatement();
String chdet[] = new String[8];
String query="SELECT DESCRIPTION,DETAILED_DESCRIPTION,PRIORITY,RISK_LEVEL FROM Table_Name";
resultSet = statement.executeQuery(query);
ArrayList<String> record=new ArrayList<String>();
while (resultSet.next())
{
record.add(resultSet.getString("DESCRIPTION"));
record.add(resultSet.getString("DETAILED_DESCRIPTION"));
record.add(resultSet.getString("PRIORITY"));
record.add(resultSet.getString("RISK_LEVEL"));
}
if(record.size()>0)
{
chdet[0] = record.get(0);
chdet[1] = record.get(1);
chdet[2] = record.get(2);
chdet[3] = record.get(3);
break;
}
}
return chdet;