Arithmetic Operators

Purpose: Used to perform mathematical calculations on numeric values.Operators:

  • +: Addition
  • -: Subtraction
  • *: Multiplication
  • /: Division
  • %: Modulus (remainder)

Example:

SELECT salary, salary * 0.1 AS bonus FROM employees;

Explanation: This calculates a 10% bonus on the salary for each employee.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *