w3resource logo


Oracle Exercises

Oracle Basic - Exercises with Solution

Secondary Nav

Oracle Basic [3 exercises with solution]

1. Write a query to list first name, last name and their salary for employee contained in the employees table.
Note: To specify multiple columns in a SELECT list, you separate the column names with commas. For good practice insert a space after each comma for readability.

Click me to see the solution

2. Write a query to display all the columns of employees table.
Note: To display all the columns for a particular table, you can use the asterisk (*) wildcard character as the SELECT list instead of typing the name of every column.
The result set displays the columns in the order in which they are defined in the table

Click me to see the solution

3. Write a query to display first name, last name and their salary of employees where column headings will be specified as aliases: FirstName, LastName and Salary.
Note: To display a column with a new heading, you can rename a column within your report by using an alias immediately after the correct name of the column. This alias effectively renames the item for the duration of the query.

Click me to see the solution

4.Write a query to list first name, last name and their salary for first 10 employee contained in the employees table.

Click me to see the solution

More to Come !



Join our Question Answer community to learn and share your programming knowledge.

Solve these problems:

Java: How to convert a string to an integer in Java?

C#: Loops in c#

SQL: JOIN using more than 5 tables