Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / System Packages
 

Use utl_raw substr

SQL> SQL> create table t ( r raw(10) ); Table created. SQL> SQL> insert into t values ( utl_raw.cast_to_raw('helloWorld' ) ); 1 row created. SQL> SQL> select utl_raw.substr(r,2,3) r1, hextoraw(substr(r,3,6)) r2 from t   2 SQL> drop table t; Table dropped. SQL>