Java: How to insert CLOB into oracle database

前端 未结 10 1280
情话喂你
情话喂你 2020-12-03 03:32

I need to write an XML file content into oracle database where the column is of CLOB datatype. How will I do that?

10条回答
  •  星月不相逢
    2020-12-03 04:01

    Converting clob to string:

    Clob clob=rs.getClob(2);      
    String str=(String)clob.getSubString(1,(int)clob.length());      
    System.out.println("Clob Data is : "+str);
    

提交回复
热议问题