Getting started with oracle database data query: oracle Data Query

Source: Internet
Author: User

Getting started with oracle database data query: oracle Data Query

1. perform operations on data using arithmetic expressions during the Query Process
The student table structure is as follows:

The last salary represents the monthly salary of each person. Now I want to query the annual salary of each person:

2. Use the nvl function to process null values and insert a data entry into the table. The salary item of the data is null:

Do not use the nvl function:

Use the nvl function:

3. Connect the query result string:

Here we use the emp table provided by scott after oracle is installed:

4. Search for employees who have joined the company since January 1, January 23, 1982. You can use either of the following methods:

5. query employees whose salaries are greater than or equal to 2000 and less than or equal to 3000:

6. display the name and salary of an employee whose first letter is "S:

7. display the name and salary of an employee whose second letter is L (Note: Data in oracle is case sensitive ):

8. Use the keyword in where

9. Employees without superiors are shown (note that mgr = null cannot be written here ):

10. query employees whose salaries are higher than 500 or whose positions are MANAGER, and set their names to uppercase J.

11. Use the order by clause. The default value is asc.
Display employee information from high to low by salary

12. The descending order of employees' salaries is shown in ascending order of Department numbers:

13. sort by annual salary:

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.