SQL> DECLARE
2
3 x CHAR(30 CHAR) := 'The character ?is two-bytes.';
4 BEGIN
5 --Find the location of "is" in terms of characters
6 DBMS_OUTPUT.PUT_LINE(INSTR(x,'is'));
7
8 --Find the location of "is" in terms of bytes
9 DBMS_OUTPUT.PUT_LINE(INSTRB(x,'is'));
10 END;
11 /
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>
|