Tag: CLOB

Sample program that transfers data from MySQL to Oracle (CLOB)

Table structure in Oracle SQL> desc scott.oracletable; Name Null? Type ----------------------------------------- -------- ---------- TRANSDATE NOT NULL DATE SEQUENCE_NO NOT NULL NUMBER(6) LOBDATA NOT NULL CLOB Table structure in MySQL: Name Type ----------------------------------------- -------- trandate Date sequence_no smallint(6) textfield longtext -- Code: TransferMySQLToOracle.java import java.sql.*; import java.io.*; import java.lang.StringBuffer; import java.util.Date; import java.text.SimpleDateFormat; public class TransferMySQLToOracle … Continue reading Sample program that transfers data from MySQL to Oracle (CLOB)

How to find a length of LOB column?

Using dbms_lob.getlength(column name) one can find the length of the LOB (CLOB/BLOB/BFILE) data type. Example: SQL> SELECT dbms_lob.getlength(lob_column) FROM scott.lob_table; DBMS_LOB.GETLENGTH(lob_column) -------------------------------- 358 153 ...

Set default number of bytes to display LONG and CLOB

To change default number of bytes to be displayed when selecting LONG and CLOB columns. SQL> SET LONG 2000 SQL> SELECT long_column, clob_column FROM table_name;