前段時間遇到要把Oracle中的Clob類型的字段 轉換成 String類型 第一步:Oracle中的 Clob類型 映射 JavaBean中字段 也是Clob public class ReturntBo { private Clob backReason; private String returnReason; public Clob getBackReason() { return backReason; } public void setBackReason(Clob backReason) { this.backReason = backReason; } public String getReturnReason() { return returnReason; } public void setReturnReason(String returnReason) { this.returnReason = returnReason; } } 第二步:把Clob類型轉換成 String類型 Clob clob = bo.getBackReason(); String returnReason = clob.getSubString((long)1, (int)clob.length());