Perform various operations on the EMP table in Scott

Source: Internet
Author: User

1, showing annual salary for each employee

Select sal*12 year salary from EMP;

2, showing the annual income of each employee

Select Empno,ename, (SAL+NVL (comm,0)) *12 annual income from EMP;

3, showing employees with wages above 3000

Select Empno,ename,sal from emp where sal>3000;

4, how to find employees who have been in employment since 1982.1.1

Select Empno,ename,sal,hiredate from emp where hiredate> ' January-January-1982 ';

5, how to show the salary of 2000 to 2500 employee situation

Select Empno,ename,sal,hiredate from emp where Sal between and 2500;

6. How to display the employee name and salary for the first character s

Select Empno,ename,sal,hiredate from emp where ename like ' s% ';

7, how to display the names and wages of all employees with a third character in uppercase O

Select Empno,ename,sal,hiredate from emp where ename like ' __o% ';

Perform various operations on the EMP table in Scott

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.