---
title: "varchar2只支持4000个，clob转string "
author: "chenlin10058"
date: "2015-01-09T15:30:22Z"
tags: []
categories: ["数据库"]
slug: "varchar2-4000-clob-string"
draft: false
lastmod: "2015-01-09T15:30:22Z"
id: 2174387
url: "https://chenlin10058.iteye.com/blog/2174387"
---

笔记2015：

 varchar2只支持4000个，clob就转string  
  public static String oracleClob2Str(Clob clob) throws Exception { 

        return (clob != null ? clob.getSubString(1, (int) clob.length()) : null); 

 

    }