1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【PLSQL】BLOBデータにINSERT

Last updated at Posted at 2019-03-18

#BLOBデータにINSERT
##やりたいこと
作成したBLOBのcolumnにデータをINSERTしたい。
BLOBはバイナリに変換して登録してあげる必要があります。

登録したデータの確認方法は下記参照
【OracleDB】BLOBデータをVARCHAR2にキャストして内容確認

##コード
変換にはutl_raw.cast_to_rawを使用します。

  INSERT INTO table1(
    emd_cd,
    emp_name
  ) VALUES (
    utl_raw.cast_to_raw('111000'),
    utl_raw.cast_to_raw('田中太郎')
  );
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?