Operator
|
Description
|
+
|
Add
|
-
|
Subtract
|
*
|
Multiply
|
/
|
Divide
|
SELECT customer_name,unit, price, price+ 300 FROM customers;
Operator Precedence
If an arithmetic expression contains
more than one operator, multiplication and division are evaluated first. If
operators in an expression are of the same priority, then evaluation is done
from left to right. You can use parentheses to force the
expression that is enclosed by parentheses to be evaluated first.
Rules of Precedence:
Rules of Precedence:
1. Multiplication
and division occur before addition and subtraction.
No comments:
Post a Comment