HomeOracle Page 3 - SQL Script Support in Oracle 10G Express Edition
Creating a script - Oracle
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 another tutorial we saw how to use the Query Builder, the graphical interface for fashioning and running SQL in the Oracle XE. The present tutorial describes the SQL scripting support in Oracle XE. In order to bring out the basic features of scripting support a few example scripts are considered in the discussion.
As we saw earlier, the script editor gives you access to create, modify, delete, save, and so on. Let's create a script file for demonstrating the use of looping using PL/SQL. This control structure in PL/SQL starts with a variable having a value 1 and increments it through 2 each time through the loop, until the final value reached does not exceed 10. It writes out the values as well. The next picture shows the script created (all steps deleted) except for the results, which shows the script as well as the results.
Errors in scripting show up with excellent help to troubleshoot the errors, as it shows the line where the error occurred and other details.