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.