Operators in SQL are defined as symbols and keywords that are used to specify an action to be performed on one or more expression called operands or arguments.
There are two general types of operators:
Unary operators: Applied to only one operand at the time; the typical format is <
Binary operators: Applied to two operands at the time; they usually appear in the format <
Arithmetic operators, just as the name implies, are used for arithmetic computations. The use of the arithmetic operators is very intuitive (assuming that one did not flunk elementary school), and they can be used in virtually every clause of the SQL statement. Table 11-1 provides the full list of arithmetic operators.
The string concatenation operator is a binary operator that glues two character strings together, and is, in a way, similar to the addition operator that adds two numbers. String concatenation operators are listed in Table 11-2.
Table 11.1. Arithmetic Operators
Addition; adds two numbers or — in the case of Microsoft SQL Server — also concatenates strings. With this exception, the usage is identical across all three databases. Only Microsoft SQL Server overloads the operator, using it both for concatenation and addition. Valid for all "big three" databases as well as for SQL:2003 syntax.
Subtraction; subtracts one numeric value from another. The usage is identical across ...