Preamble
The Oracle/PLSQL ASCII function returns the numeric representation of the leftmost character of the string.
Syntax of the Oracle/PLSQL ASCII function
ASCII( single_character_id )
- single_character_id – symbol for getting a numeric code. If more than one character is passed, the ASCII function will return a value for the first character and ignore all subsequent characters.
The ASCII function returns a numeric value.
ASCII function in the following versions of Oracle/PLSQL
|
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
|
Let’s consider some examples of the ASCII function and learn how to use the ASCII function in Oracle PLSQL.
SQL> SELECT ASCII('a') FROM DUAL;
--Result: 97
SQL> SELECT ASCII('t') FROM DUAL;
--Result: 116
SQL> SELECT ASCII('T') FROM DUAL;
--Result: 84
SQL> SELECT ASCII('T2') FROM DUAL;
--Result: 84.
SQL> SELECT ASCII('%') FROM DUAL;
--Result: 37
SQL> SELECT ASCII('A') FROM DUAL;
--Result: 65
ASCII Function in SQL Query with Example
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
How to Optimize Food and Beverage Manufacturing with Enteros Database Software, Operational Intelligence, and Cloud FinOps
- 28 July 2026
- Database Performance Management
Introduction The food and beverage industry operates in a highly competitive, fast-moving, and tightly regulated environment where efficiency, product quality, food safety, and supply chain reliability determine business success. Manufacturers must manage thousands of products, rapidly changing consumer demand, seasonal production cycles, strict regulatory requirements, and global distribution networks while maintaining profitability. Today’s food and … Continue reading “How to Optimize Food and Beverage Manufacturing with Enteros Database Software, Operational Intelligence, and Cloud FinOps”
The Role of Intelligent Database Analytics in Optimizing Hybrid Cloud Performance
- 27 July 2026
- Database Performance Management
Introduction Hybrid cloud has become the preferred IT strategy for modern enterprises seeking the flexibility of public cloud services while maintaining control over critical workloads in private cloud and on-premises environments. Organizations across banking, healthcare, retail, manufacturing, telecommunications, and government sectors increasingly rely on hybrid cloud architectures to balance scalability, compliance, cost efficiency, and application … Continue reading “The Role of Intelligent Database Analytics in Optimizing Hybrid Cloud Performance”
How to Optimize Aerospace and Defense Operations with Enteros Database Software, Database Observability, and AI-Powered Analytics
- 26 July 2026
- Database Performance Management
Introduction The aerospace and defense (A&D) industry operates some of the world’s most sophisticated and mission-critical technology environments. Aircraft manufacturers, defense contractors, space organizations, satellite operators, maintenance providers, and government defense agencies manage enormous volumes of engineering, manufacturing, logistics, operational, and security data every day. From aircraft design and production to fleet maintenance, mission planning, … Continue reading “How to Optimize Aerospace and Defense Operations with Enteros Database Software, Database Observability, and AI-Powered Analytics”
How to Optimize Automotive Manufacturing with Enteros Database Software, AI-Powered Analytics, and Operational Intelligence
Introduction The automotive industry is undergoing its most significant transformation in decades. Traditional vehicle manufacturing is rapidly evolving with electric vehicles (EVs), autonomous driving technologies, connected cars, smart factories, robotics, Industrial Internet of Things (IIoT), artificial intelligence (AI), and cloud computing. Automotive manufacturers and suppliers must manage increasingly complex operations while maintaining production efficiency, product … Continue reading “How to Optimize Automotive Manufacturing with Enteros Database Software, AI-Powered Analytics, and Operational Intelligence”