Querying the database is one of the most common tasks that you may have to carry out routinely. This tutorial shows you the options for running SQL queries and how to run the queries against the database in the Oracle Express Edition, Oracle XE for short.
In order to get information about logging in and out of Oracle XE, please review my first article which gives you an overview of Oracle XE.
You can access the login page by going from the shortcut Go To Database Home Page... shown in the next picture.
This opens up the login page shown in the next picture. It is assumed that you can log in to the HR database, which has a couple of tables. If you have not reviewed the previous article, you logged in as System with the password you gave yourself and then unlocked the HR database; otherwise you will not have permission to access the HR database. Please review the previous article.
This takes you to the HR database where the user hr has logged in as shown here, showing all the available objects. Since you will be looking at SQL, click on the icon SQL. If you click on the drop-down you will get a menu from which you may have to choose.
Clicking on the icon opens three more icons, all related to SQL. They are SQL Command, SQL Scripts, and Query Builder.
In this tutorial you will look at using the SQL Commands. Click on the icon SQL Commands, or on the drop down.
When you click on the icon you get the next screen as shown. In this window you will be typing in the SQL and displaying the results of your SQL Query. In the upper pane you type in your SQL statement and in the bottom, tabbed pane you get the results. The Results tab is the default. Once you get the results you can look at several related facts, as shown in this picture, by tabbing the various items.