title: Generate ansi sql INSERT INTO
body: <p>I have Oracle database with 10 tables. Some of the tables have CLOB data text. I need to export data from these tables pro-grammatically using java. The export data should be in ANSI INSERT INTO SQL format, for example: </p>
  
  <pre><code>INSERT INTO table_name (column1, column2, column3, ...)
  VALUES (value1, value2, value3, ...);
  </code></pre>
  
  <p>The main idea is that I need to import this data into three different databases:
  <strong>ORACLE</strong>, <strong>MSSQL</strong> and <strong>MySQL</strong>. As I know all these databases support ANSI INSERT INTO. But I have not found any java API/framework for generating data SQL scripts. And I do not know how to deal with CLOB data, how to export it. <br>
  What is the best way to export data from a database with java? <br><br>
  <strong>UPDATE:</strong> (01.07.2018) <br>
  I guess it is impossible to insert text data more than 4000 bytes according to <a href="https://stackoverflow.com/questions/3890567/how-to-write-oracle-insert-script-with-one-field-as-clob">this answer</a>. How to generate PL\SQL scripts using java programmatically? Or is there any other export format which supports ORACLE, MSSQL, etc?</p>