HomeOracle Using Query Builder in the Oracle 10g Express Edition
Using Query Builder in the Oracle 10g Express Edition
In an earlier tutorial we saw how to use SQL commands in the Oracle 10g Express Edition, or simply Oracle XE. We also saw how to use the PL/SQL commands as well. In this tutorial we will see how to use the Query Builder, the graphical interface for fashioning and running SQL in the Oracle XE. The tutorial shows how to interact with the query builder to create a SELECT query in the context of a single table as well as a SELECT query from two related tables.
It is assumed that you have downloaded Oracle 10g Express Edition and that you have unlocked the HR database so that you can log on to this database as a user. Now from the shortcut on your desktop you can log in by clicking on the Go to the Database Homepage... shortcut, which can be accessed from All Programs-->Oracle 10g Express Edition. This opens up the following window.
Log in to the database using the credentials Username: hr and Password: hr as shown in the above picture. This should open up the following window. There are five main objects (nodes). The Object Browser shows all the objects in the database. Now click on the SQL icon.
This will open up a window which gives you access to all the SQL functions in Oracle XE, SQL Commands, SQL Scripts, and Query Builder as shown. Please review the SQL Command icon related tutorial as it will help you in understanding the present tutorial.
Clicking on the Query Builder opens up the Query Builder specific window as shown in the next screen. It is in this window that you will bring in your table/view, or tables. You can set up the conditions that you may want to establish for the sets that will be returned by the query, by interacting with the bottom pane. This will be explained in this tutorial. The annotations in the different areas are by the author of this tutorial and are not part of Oracle's documentation. In this window you can also search for other objects by entering even a single letter and clicking on the search area shown in the Search for database objects. There are already objects in the hr database shown in the indicated area "Database Objects." Clicking a table, for example, in this area will transfer a copy of the table to the design area on the right.
While designing a query you will bring in the table/view from the left hand side, from the object listing, to the right hand, top pane -- the design area. In combination with the bottom pane, you design the query, imposing the conditions which are typically the Where, Order by, Group by, clauses of an SQL query. This will be shown in the next section.