Wednesday, 17 October 2012

ARITHMETIC OPERATORS





Arithmetic operators perform mathematical operations on two expressions of any of the data types of the numeric data type category.
  • Addition          :           +
  • Subtraction    :           -
  • Multiplication  :           *
  • Division          :           /
  • Modulo           :           %

Addition: Adds two numbers
Example: Select 3+2
Result: 5

Subtraction: Subtracts two numbers
Example: Select 3-2
Result: 1

Multiplication: Multiplies two expressions
Example: Select 3*2
Result: 6

Division: Divides one number by another
Example: Select 3.0/2.0
Result: 1.50

Modulo: Returns the remainder of one number divided by another.
Example: Select 3%2
Result: 1


No comments:

Post a Comment