Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

BLOB save file

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Insert text INSERT INTO lobdemo (key, clob_col, blob_col, bfile_col) VALUES (51, 'This is another character literal', HEXTORAW (' ABABABABABABABABABAB'), NULL) into the blob field; 2. Update the blob field text UPDATE peoplesoft SET SUPPLIER_ID = HEXTORAW ('CDCDCDCDCDCDCDCDCDCDCDCD') where rownum = 2 position update PEOPLESOFT_1M set supplier_id = utl_raw.cast_to_raw (vendor_id); 3. Insert the file CREATE TABLE yuser (ID number,photo BLOB) into the blob field; create or replace directory images as'/ test'; declare l_bfile bfile; l_blob blob; begin insert into yuser (ID,photo) values (1minute emptyroomblob ()) return photo into Loblobs; l_bfile:=bfilename ('IMAGES','test.doc');-- IMAGES is the uppercase dbms_lob.open of the directory created above. Dbms_lob.loadfromfile (l_bfile); dbms_lob.close (l_bfile); commit; end; /

The way update

Declare l_bfile bfile; l_blob blob; begin update yuser set photo = empty_blob () where id = 2 return photo into Loblobs; l_bfile:=bfilename ('IMAGES','PS.pdf'); dbms_lob.open (LobfileReadreadonly); dbms_lob.loadfromfile (LingubFiles); dbms_lob.close (l_bfile); commit; end;,

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report