Oracle
  Home arrow Oracle arrow Page 5 - Using Query Builder in the Oracle 10g ...
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 
IBM Developerworks
 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

Using Query Builder in the Oracle 10g Express Edition
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2006-06-14

    Table of Contents:
  • Using Query Builder in the Oracle 10g Express Edition
  • Querying a single table
  • A simple SELECT query
  • Creating a SELECT query with a WHERE clause
  • Creating a SELECT query on two tables which are related

  • 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

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    Using Query Builder in the Oracle 10g Express Edition - Creating a SELECT query on two tables which are related
    (Page 5 of 5 )

    Tables in relational databases have relationships established when tables are designed. For example, the following picture shows two tables being added to the design pane. You see a line connecting one table to the other. This is the line that shows what kind of relationship exists. When you add the table, this line does not exist, but you can manually "link" the tables to make the relationship visible as well as enter the link into the SQL statement as a "join" condition. Unlike in the first example, the EMPLOYEES and DEPARTMENT objects are tables. These have a primary key, the unique identifier of the table which can be found in the "Object Browser." For object browser details, please refer to the previous tutorial.

    Making a Join is easy, click on the rectangle to the right of the column of one table and go to another table, pick a column and click on the extreme right, rectangle. This establishes the 'grey' line making a 'join'.

    This shows the Primary key of one table joined to the Foreign key of the other table.

    There are different kinds of joins to expose columns from the two tables. In the query editor, if you right click on the line joining the two tables, you will reveal a small pick-list from which you may specify the type of join you desire to make.

    If you pick the set "Left outer join" the editor sets up the requested type of join. If you want to look at what kind of join you made, just hover over the line and you should see the type of join as shown.

    This shows the design view with left outer join set.  The association between the Design view and the SQL Query is through the small "+" symbol in the Query Editor view of the table and the "+" inside the parenthesis in the "Where" clause which establishes the "join" as shown in the next two pictures. The last picture also shows the result of this query.

     

     

    Summary

    The Query Editor affords all the necessary functions to tailor a query, run, and save the query. The Query Editor gives immediate access to all the objects that are needed for the query. One may feel that it would have been nicer to alter the SQL statement in the SQL tab, but because a separate object (SQL Command) has been designed, this functionality was left out in the query editor. I am sure you will find it quick and easy to design SQL queries with this interface to your heart's content.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Coding queries and running queries are the most frequent chores you would be doing...
     

       

    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 2 hosted by Hostway