Posted By

bbrumm on 03/06/17


Tagged

sql Oracle


Versions (?)

Oracle TO_LOB Function


 / Published in: SQL
 

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

A few examples of the TO_LOB function.

  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;

Report this snippet  

You need to login to post a comment.