Arithmetic
expressions can be used with SQL statements.
Operator
|
Description
|
+
|
Add
|
-
|
Subtract
|
*
|
Multiply
|
/
|
Divide
|
Using arithmetic expression in queries
Example
SELECT first_name, salary, salary + 500 FROM employees;
As result from above query 500 will be added all
employees salary and will be shown separately.
First_name
|
Salary
|
Salary +500
|
Kery
|
400
|
900
|
Edy
|
340
|
840
|
No comments:
Post a Comment