Oracle TO_LOB Function


/ Published in: SQL
Save to your folder(s)

A few examples of the TO_LOB function.


Copy this code and paste it in your HTML
  1. CREATE TABLE first_table (
  2. id NUMBER,
  3. longval LONG
  4. );
  5.  
  6. INSERT INTO first_table (id, longval) VALUES (1, 120034);
  7.  
  8.  
  9. CREATE TABLE second_table (
  10. id NUMBER,
  11. clobval CLOB
  12. );
  13.  
  14. INSERT INTO second_table (id, clobval) (
  15. SELECT id, TO_LOB(longval) FROM first_table
  16. );
  17.  
  18. SELECT id, clobval
  19. FROM second_table;

URL: http://www.databasestar.com/oracle-to_lob/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.