Open In App

PLSQL | CHR Function

Last Updated : 19 Sep, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. The CHR Function in PLSQL is the opposite of the ASCII function and is used to return the character based on the NUMBER code. Syntax:
CHR( number_code )
Parameters Used: number_code - It is used to retrieve the character for the specified number code. Supported Versions of Oracle/PLSQL:
  1. Oracle 12c
  2. Oracle 11g
  3. Oracle 10g
  4. Oracle 9i
  5. Oracle 8i
Example:
DECLARE 
   Test_Char varchar2(4) := '69';
   Test_Char1 varchar2(4) := '72';
   
   BEGIN 
   dbms_output.put_line(CHR(Test_Char)); 
   dbms_output.put_line(CHR(Test_Char1)); 
    
END; 
Output:
E
H

Next Article
Article Tags :

Similar Reads