An operator manipulates data elements and returns a result. The data elements that are operated upon are called operands or arguments, and a special character or keyword represents the actual operator. Oracle SQL supports several types of operators, listed in this section.
Arithmetic operators perform arithmetical calculations on a pair of data elements and/or constants. Table 1-1 lists the arithmetic operators available in SQL.
|+||Addition||sal + comm|
|-||Subtraction||sal - comm|
|*||Multiplication||sal * 1.1|
|/||Division||sal / 12|
The concatenation operator (||) combines two character strings. Consider the following SQL statement:
SELECT fname || ' ' || lname FROM employee_master;
This statement returns (for each row) a single string consisting of the first name, a space, and the last name.