Arithmetic Operations in Pl/SQL in Oracle

Q

What Are the Arithmetic Operations in Oracle?

✍: FYIcenter.com

A

There are 4 basic arithmetic operations on numeric values as shown in the following sample script:

PROCEDURE proc_arithmetic AS
  addition NUMBER; 
  subtraction NUMBER;
  multiplication NUMBER;
  division NUMBER;
BEGIN
  addition := 7 + 8; 
  subtraction := addition - 7; 
  multiplication := subtraction * 5; 
  division := multiplication / 8;
  -- division should contain 5 now
END;

 

Understanding PL/SQL Language Basics

⇒⇒Oracle Database Tutorials

2016-10-17, 140👍, 0💬