Beginner

38. SQL Arithmetic Operators

Learn how arithmetic operators are used to perform mathematical calculations in SQL.

📘 Lesson 38 of 728 ⏱ 8 min 🎯 Beginner

Arithmetic operators are symbols used to perform mathematical operations on numeric values. Common arithmetic operators include addition (+), subtraction (-), multiplication (*), division (/), and the modulo operator (%) in database systems that support it.

Business analysis often requires calculated metrics that are not directly stored in a database. Arithmetic operators allow analysts to calculate annual salaries, profit, differences, percentages, quantities, and other metrics.

If Salary represents monthly salary, multiplying it by 12 can calculate an annual salary.

SQL
SELECT
    EmployeeName,
    Salary,
    Salary * 12 AS AnnualSalary
FROM Employees;

Arithmetic operators are used in financial analysis, sales calculations, salary analysis, inventory analysis, profitability calculations, and operational reporting.

  • + performs addition.
  • - performs subtraction.
  • * performs multiplication.
  • / performs division.
  • % can represent modulo in supported systems.
  • Arithmetic operators can be used inside SQL expressions.
What are SQL arithmetic operators?

They are operators used to perform mathematical calculations such as addition, subtraction, multiplication, and division.

How can you calculate annual salary from monthly salary?

You can multiply the monthly Salary value by 12, for example Salary * 12.

Have you finished this lesson?

Introduction to SQL – All Lessons