Pages

Saturday, May 22, 2010

Step5 – Apex Developer Day - Adding a Table Using a Script

 

0. Another way to create database objects and load data is to use a script. Select SQL Scripts from the drop down list box.

clip_image002

You may have noticed that the APEX_TASKS.ASSIGNED_TO column was a number. In this topic, you run a script to create the APEX_EMPLOYEES table and load a list of current employees. Each employee has an EMPLOYEE_ID that corresponds to the numbers found in the APEX_TASKS.ASSIGNED_TO column. Perform the following steps:

1.

Click Upload.

clip_image004

2.

Click Browse...

clip_image006

3.

Select employees.sql and click Open. Enter APEX_EMPLOYEES for the Script Name and click Upload.

Find the employyes.sql in /home/oracle/wkdir/apexstart/employee.sql

clip_image008

4.

Select the APEX_EMPLOYEES script.

clip_image010

5.

The script is shown. Click Run.

clip_image012

6.

Click Run to confirm.

clip_image014

7.

The script was executed. To view the results, click the View Results icon.

clip_image016

8.

The APEX_EMPLOYEES table was created and some data was inserted. Click the SQL Workshop breadcrumb.

clip_image018

Information: We have created two tables and one reference (Lookup) table. Let’s continue

No comments:

Post a Comment