Assume variable a holds 10 and variable b holds 20, then:
Show Examples
Operator Description Example
+ Addition - Adds values on either side of a + b will give 30
the operator
- Subtraction - Subtracts right hand a - b will give -10
operand from left hand operand
* Multiplication - Multiplies values on either a * b will give 200
side of the operator
/ Division - Divides left hand operand by b / a will give 2
right hand operand
% Modulus - Divides left hand operand by b % a will give 0
right hand operand and returns
remainder
SQL Comparison Operators:
Assume variable a holds 10 and variable b holds 20, then:
Show Examples
Operator Description Example
= Checks if the values of two operands are a = b is not true.
equal or not, if yes then condition
becomes true.
!= Checks if the values of two operands are a! = b is true.
equal or not, if values are not equal then
condition becomes true.
<> Checks if the values of two operands are a <> b is true.
equal or not, if values are not equal then
condition becomes true.
> Checks if the value of left operand is a > b is not true.
greater than the value of right operand, if
yes then condition becomes true.
< Checks if the value of left operand is less a < b is true.
than the value of right operand, if yes
then condition becomes true.
>= Checks if the value of left operand is a >= b is not true.
greater than or equal to the value of right
operand, if yes then condition becomes
true.
<= Checks if the value of left operand is less a <= b is true.
than or equal to the value of right
operand, if yes then condition becomes
true.
!< Checks if the value of left operand is not a! < b is false.