Running SQL Statements in the Script Editor Page

Previous
Previous
Next
Next

You can enter SQL statements on the Script Editor page and create a SQL script that can be saved in the database. The script can be downloaded to the local file system, and can be run from SQL Command Line (SQL*Plus). For information about running SQL scripts from SQL Command Line, see "Running Scripts From SQL Command Line".

To access and run SQL statements on the SQL Script Editor page:

  1. Log in to the Database Home Page. See "Logging in to the Database Home Page". To run the examples in this guide, log in as user HR with your password for the HR account.

  2. On the home page, click the SQL icon to display the SQL page.

  3. Click the SQL Scripts icon to display the Script Editor page.

  4. Click the Create button to create a SQL script.

  5. In the Script Name field, enter a name (my_sql_script) for the script.

  6. In the Script Editor entry area, enter the SQL statements and comments in Example: Using the SQL SELECT Statement to Query Data From Specific Columns.

  7. Click the Run button on the Script Editor page to begin the processing of the statements in the script.

    The Run Script page displays information about the script, including any errors or SQL Command Line (SQL*Plus) commands that will be ignored when the script is run.

  8. Click the Run button on the Run Script page to confirm your request, and start running the script.

  9. Click the View Results icon for the script (my_sql_script) on the Manage Scripts page to display the results of the script.

  10. Select the Detail view and enable all the Show options on the Results page to display details about the script results.

  11. Click the Edit Script button to continue working on the SQL script.

  12. When you are finished updating the script, click the Save button to save the script file in the database repository for future use.

  13. To save the SQL script on the local file system, click the Download button, and choose the location for the script file. Note that the .sql extension is appended to the SQL script name.


See Also:

Oracle Database Express Edition Application Express User's Guide for detailed information about using SQL Scripts