Time for action – setting up the database tables
In order to create the Employee
and Department
tables for HRSchema
, you will have to download the sample script (Demobld.sql
) from http://www.oracle-database-tips.com/demobld.html.
In order to run this script, right-click on the HRSchema option from the IDE Connections panel and select Open in Database Navigator as shown in the following screenshot:
This will open the connection in the Database Navigator panel, and open an SQL worksheet for you.
Copy and paste the SQL statements from
Demobld.sql
to the worksheet.Click on the Run Script option available for the worksheet or press F5.
What just happened?
The demobld.sql
script will create the following tables in the HRSchema
database: EMP
, DEPT
, BONUS
, SALGRADE
, and DUMMY
.
These tables can be located from the Tables section in HRSchema
.
Note
Other tables that you see in HRSchema
are the tables that get created as part of Oracle XE Express Edition.