Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to insert data in LOBs

RE: How to insert data in LOBs

From: Trassens, Christian <CTrassens_at_uni2.es>
Date: Fri, 09 Feb 2001 02:14:42 -0800
Message-ID: <F001.002B0147.20010209015022@fatcity.com>

If you use CLOB, you can insert text in the same way as with varchar2. If you have BLOB, you'll probably need the function utl_raw or dbms_lob. However with BFILE, you should create a directory with the stmt: CREATE DIRECTORY and insert using BFILENAME expression. Then you have the function EMPTY_BLOB() or EMPTY_CLOB to set them without a value.

An example

SQL> desc kk

 Nombre                                    żNulo?   Tipo
 ----------------------------------------- --------
----------------------------
 A                                                  CLOB
 B                                                  BLOB

SQL> r
  1 insert into kk
  2* values ('PUMAS',utl_raw.cast_to_raw(' are the best rugby team'))

1 fila creada.

Regards.

> -----Mensaje original-----
> De: Saurabh Sharma [SMTP:saurabhs_at_fcsltd.com]
> Enviado el: jueves 8 de febrero de 2001 14:32
> Para: Multiple recipients of list ORACLE-L
> Asunto: How to insert data in LOBs
>
> hi all,
> i want to know how to insert values i.e. text/word or images
> in a table's LOB column.
> can we insert them with the regular insert command.
> please help in this regard.
> thanks in advance..
>
> saurabh
> FCS Software Solutions Ltd.
> Noida.(India)
> saurabhs_at_fcsltd.com

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Trassens, Christian
  INET: CTrassens_at_uni2.es

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Feb 09 2001 - 04:14:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US