Oracle ASCIIStr Function is used to convert a string in any character set to ASCII String. Syntax and examples of using the ASCIIStr Function are listed below.
Oracle ASCIISTR Function Syntax
SELECT ASCIIStr (string) FROM table_name;
Oracle ASCIISTR Function – Use with SQL SELECT Statement Example
Oracle ASCIISTR Function is used with the SQL SELECT Statement.
For example, the SQL ASCIISTR Function query below returns the ASCII String value of the string passed.
SELECT ASCIIStr ('Tech Honey') FROM dual;
The above SQL SELECT Query will return ‘Tech Honey’ as the ASCII String value for ‘Tech Honey’
Oracle ASCIISTR Function – Use with Special Characters Example
Oracle ASCIISTR Function can be used with special characters.
For example, the SQL ASCIISTR Function query below returns the ASCII String format for the string passed.
SELECT ASCIIStr ('Tech Honey Ä Ê Õ Ø') FROM dual;
The above SQL SELECT Query will return ‘Tech Honey \00C4 \00CA \00D5 \00D8’ as the ASCII String value for ‘’Tech Honey Ä Ê Õ Ø’’