Tuesday 12 October 2010

Dealing with LOB in Oracle

Link: http://www.java2s.com/Tutorial/Oracle/0660__Large-Objects/Updateclobdata.htm
SQL>

SQL> CREATE TABLE myClobTable (id NUMBER,clob_data CLOB);

Table created.

SQL>
SQL> CREATE TABLE myLongTable (id NUMBER,long_data LONG);

Table created.

SQL>
SQL> INSERT INTO myLongTable VALUES (100,RPAD('A',200000,'A'));

1 row created.

SQL>
SQL>
SQL> update myClobTable set clob_data =(select to_lob(long_data)from
2 myLongTable where id =100)
3
SQL> drop table myLongTable;

Table dropped.

SQL>
SQL>
SQL> drop table myClobTable;

Table dropped.

No comments:

Post a Comment

Azure OpenAI Architecture Patterns & Deployment Patterns

Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...