Oracle PL/SQL Tutorial/Conversion Functions/TO MULTI BYTE
Версия от 13:45, 26 мая 2010; (обсуждение)
Convert single-byte "G" to its multibyte representation
SQL> DECLARE
2 g_one_byte NVARCHAR2 (1 CHAR) := "G";
3 g_three_bytes NVARCHAR2 (1 CHAR);
4 g_one_again NVARCHAR2(1 CHAR);
5 dump_output VARCHAR2(30);
6 BEGIN
7
8 g_three_bytes := TO_MULTI_BYTE(g_one_byte);
9 DBMS_OUTPUT.PUT_LINE(LENGTHB(g_one_byte));
10 DBMS_OUTPUT.PUT_LINE(LENGTHB(g_three_bytes));
11 SELECT DUMP(g_three_bytes) INTO dump_output FROM dual;
12 DBMS_OUTPUT.PUT_LINE(dump_output);
13
14 END;
15 /
PL/SQL procedure successfully completed.
SQL>