Oracle arithmetic operations

Source: Internet
Author: User
By default, Oracle has created a SCOTT user whose default password is tiger. The user has four tables: employee table (EMP) and 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

By default, Oracle has created a SCOTT user whose default password is tiger. The user has four tables: employee table (EMP) and 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

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.