Database Reference
In-Depth Information
7.2.1
Arithmetic Operators
An arithmetic operator allows for simple arithmetic calculations in the form
shown:
<expression> <operator> <expression>
* and / execute multiplication and division, respectively, both having
the same precedence and both having higher precedence than addi-
tion and subtraction.
+ and - execute addition and subtraction, respectively, both having
the same precedence.
This example shows use of an arithmetic operator in a SELECT state-
ment producing the “Owed” column. The result is shown in Figure 7.1
SELECT ARTIST_ID, SESSION_DATE, AMOUNT_CHARGED, AMOUNT_PAID
, AMOUNT_CHARGED - AMOUNT_PAID “Owed”
FROM STUDIOTIME;
Figure 7.1
Arithmetic
Operators.
 
Search WWH ::




Custom Search