Oracle
  Home arrow Oracle arrow Page 5 - Using Query Builder in the 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

Using Query Builder in the Oracle 10g Express Edition
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 13
    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:
      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


    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.



     
     
    >>> 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