Oracle PL/SQL Tutorial/Conversion Functions/HEXTORAW
Версия от 13:45, 26 мая 2010; (обсуждение)
HEXTORAW
SQL>
SQL> CREATE TABLE myBlob
2 (id NUMBER PRIMARY KEY,
3 blob_data BLOB);
Table created.
SQL> INSERT INTO myBlob VALUES (2,HEXTORAW("AAAAAAAAAAAAAAAAAAAA"));
1 row created.
SQL>
SQL> drop table myBlob;
Table dropped.
SQL>
Table with clob and blob column
SQL>
SQL> create table myTable
2 (key NUMBER PRIMARY KEY
3 ,col_blob BLOB
4 ,col_clob CLOB);
Table created.
SQL>
SQL>
SQL> INSERT INTO myTable(key, col_blob, col_clob) VALUES (1, HEXTORAW("101F"), "ZYXW");
1 row created.
SQL>
SQL> INSERT INTO myTable(key, col_blob, col_clob) VALUES(2, HEXTORAW("111101F"), "ABCD");
1 row created.
SQL>
SQL> drop table myTable;
Table dropped.
SQL>
SQL>