Oracle
  Home arrow Oracle arrow Page 2 - SQL Script Support in Oracle 10G Express Edition
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
ORACLE

SQL Script Support in Oracle 10G Express Edition
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 27
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - 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...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek