Code Listing 4: Using the INSTR, LENGTH, and SUBSTR functions



SQL> DECLARE
  2     x CHAR(3);
  3  BEGIN
  4     x := 'ãa';
  5     DBMS_OUTPUT.PUT_LINE(INSTR(x,'a')); 

  6     DBMS_OUTPUT.PUT_LINE(LENGTH(x));
  7     DBMS_OUTPUT.PUT_LINE(SUBSTR(x,1,1));
  8  END;
  9  /
2
2

ã

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy