Oracle arithmetic operations, oracle Arithmetic
In Oracle's default installation, a SCOTT user has been created. The default password is tiger, which has four tables:
Employee table (EMP), department table (DEPT), salary Registration Form and bonus table. Next, many operations are completed under this user.
In Oracle development, there are still arithmetic operations, relational operations, and logical operations.
Oracle's arithmetic operators are not as rich as C #'s Arithmetic Operators. There are only +,-, *, And,
The result of the division sign (/) is a floating point number. The remainder operation can only be performed by MOD (x, y): returns the remainder of x divided by y.
Case 3: The year-end bonus for each employee is 2000 yuan. Please show the monthly salary and total annual salary of the employee whose basic salary is more than 2000 yuan.
Code Demonstration: arithmetic operations in queries
SQL> SELECT ENAME, SAL, (SAL * 12 + 2000) FROM EMP WHERE SAL> 2000; ENAME SAL (SAL * 12 + 2000) JONES 2975 37700 BLAKE 2850 36200 CLARK 2450 31400 SCOTT 3000 38000 KING 5000 FORD 62000 3000 38000