Oracle
  Home arrow Oracle arrow Page 2 - SQL Script Support in Oracle 10G Expre...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

SQL Script Support in Oracle 10G Express Edition
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 19
    2006-06-28

    Table of Contents:
  • SQL Script Support in Oracle 10G Express Edition
  • Sample scripts
  • Creating a script
  • Exporting and Importing of Scripts

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    PCmover - $15 Off with Coupon Code CJPH7Q

    SQL Script Support in Oracle 10G Express Edition - Sample scripts
    (Page 2 of 4 )

    For the purpose of explaining the various activities you can perform in the script editor, some sample scripts will be considered. These are very simple scripts, but enough for the present purpose.

    Selct

      Select * from First_Last;

    Adval

      INSERT INTO first_last VALUES ('Jay', 'Krishnaswamy');

    First_Last

    create table first_last(
    first_name CHAR(20),
    last_name CHAR(20)
    )
    ;
    

    As you can see above, the script First_Last creates a table which is populated by the statement shown by the script Adval and the script Selct queries the table First_Last. This is a set of some very simple basic scripts.

    Editing an existing script

    In order to edit the script Selct, place a check mark in the extreme left as shown for this script, and click on the icon for "Edit" as shown in the next picture.

    This opens up the Script Editor window as shown in the next picture. The script name you selected comes up and the script itself is displayed in the text editor as shown here. You may do a number of things in this text editor, such as undo, redo, and find text. For the script itself you can save, run, delete or download script from another location.

    Let's hit the Run button now to get to the next window as shown. You will be asked to confirm in this window. This was a simple select query and running it will cause no changes. But there will be times when it is better to caution the user to confirm. You may also notice that the query is using the schema of HR.

    Let's hit Run again. You get the window shown in the next picture. In this screen you manage the script results. It can show the status of the script, whether still executing, completed, and so on.

    If you want to see the result of running this script, click on the "View Results" icon instead of the view script Icon as suggested in the above picture (it probably is an error). You will see the summary of results (default view) as shown in the next pciture.

    To see the results of this query, you need to choose the View: Details radio button and hit the Go button as shown in the next picture.

    Next, we will edit the script for Adval and change the first and last names to "James" and "Bond" so that the edited query will insert new values into the First_Last table. The Selct query is run again, and you will notice that you have added another row to the returned results as shown. Several steps are not shown because they are a repetition of the steps described earlier.

    INSERT INTO first_last VALUES ('James', 'Bond');

    When you run this Adval script you will see the following result.

    Now if you run the Selct script again, you will see the following result.

    More Oracle Articles
    More By Jayaram Krishnaswamy


       · The three articles, this one and the previous two at Dev Shed site gives you an...
       · Excellent article but I'd like to add a tip for those who are looking how to put...
       · The blog has achieved its goal- user participation and contribution.Thanks for...
     

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway