Difference between utl_raw.length and length : utl_raw « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create table t ( r raw(10) );

Table created.

SQL>
SQL>
SQL> insert into t values ( utl_raw.cast_to_raw('helloWorld' ) );

1 row created.

SQL>
SQL> select utl_raw.length(r), length(r)/2 from t;

UTL_RAW.LENGTH(R) LENGTH(R)/2
----------------- -----------
               10          10

SQL>
SQL>
SQL> drop table t;

Table dropped.

SQL>








31.39.utl_raw
31.39.1.utl_raw.cast_to_raw
31.39.2.Use utl_raw.cast_to_raw to convert string to raw
31.39.3.select utl_raw.cast_to_varchar2(hextoraw('787878')) from dual
31.39.4.select utl_raw.cast_to_varchar2(hextoraw('534d495448')) from dual
31.39.5.Difference between utl_raw.length and length
31.39.6.Use utl_raw.substr