Operators in MySQL

Notes:

Operators in MySQL:
Expression:
- is a combination of operators and operands, on evaluation it yields a result.
Ex: 2 + 2, 2 * 2 + 2, 2 + 10 / 2 etc.

Operand: is a value; on which an operator performs the operation.
Operator: is a symbol; which performs an operation on the given operand(s).

Types of operators: Operators are broadly categorized into
Unary Operators: accept only one operand.
Binary Operators: accept two operands.

Types of MySQL Operators: LARA BS
- MySQL provides rich set of operators perform arithmetic, logical, comparison etc.

L – Logical Operators : (&& / and , || / or , ! / not, xor)
A – Arithmetic Operators : (+, -, *, /, div, %, mod)
R – Relational Operators : (=, <=>, !=, <>, <, >, <=, >=,)
A – Assignment Operators : (:= , =)
B – Bitwise Operators : (&, |, ^, <<, >>)
S – Special Operators : is, in, like, between, regexp etc.

Interview Questions: