Preamble
Oracle/PLSQL MOD function returns the residue from division m by n.
Oracle/PLSQL syntax of the MOD function
MOD( m, n )
Parameters and function arguments
- MOD is calculated as: m – n * floor(m/n)
Note:
- The MOD function uses the FLOOR function in this formula.
- The MOD function returns a numeric value.
- The MOD function returns m if n=0.
MOD function in the following Oracle/PLSQL versions
|
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
|
Let’s consider some examples of MOD function and learn how to use MOD function in Oracle/PLSQL.
SELECT MOD(15, 4) FROM DUAL;
--Result: 3
SELECT MOD(15, 0) FROM DUAL;
--Result: 15
SELECT MOD(11.6, 2) FROM DUAL;
--Result: 1.6
SELECT MOD(11.6, 2.1) FROM DUAL;
--Result: 1.1
SELECT MOD(-15, 4) FROM DUAL;
--Result: -3
SELECT MOD(-15, 0) FROM DUAL;
--Result: -15
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 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”
How AI-Powered Database Observability Strengthens Enterprise Cyber Resilience
Introduction Cyberattacks have evolved dramatically over the past decade. Modern enterprises face increasingly sophisticated ransomware attacks, insider threats, supply chain compromises, credential theft, and advanced persistent threats (APTs). As organizations continue adopting cloud-native architectures, hybrid environments, and distributed applications, protecting enterprise databases has become one of the highest cybersecurity priorities. Databases store an organization’s most … Continue reading “How AI-Powered Database Observability Strengthens Enterprise Cyber Resilience”
How Database Observability and AIOps Work Together to Improve Business Continuity
- 24 July 2026
- Software Engineering
Introduction In today’s digital-first economy, business continuity depends heavily on the availability, reliability, and performance of enterprise applications. Organizations across banking, financial services, healthcare, education, retail, telecommunications, SaaS, and e-commerce rely on complex technology ecosystems where databases serve as the foundation for critical operations. Every customer transaction, online service request, healthcare record update, financial operation, … Continue reading “How Database Observability and AIOps Work Together to Improve Business Continuity”