|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The new Oracle9i SQL USING and ON clauseAs part of the Oracle9i enhancements to ISO 99 SQL, Oracle has added new USING and ON clauses for performing natural joins. This allows additional flexibility to the developer since they are able to explicitly control the columns that are used in the table join. The USING clause is used if several columns can be used to join the tables. Oracle8i select last_name,
department_name employees e,
departments d e.department_id = d.department_id; Oracle9i select last_name,
department_name employees e,
departments d The ON clause is used to join tables where the column names do not match in both tables. Oracle8i select last_name,
department_name employees e,
departments d e.department_id = d.dept_id; Oracle9i select last_name,
department_name employees e,
departments d It is important to note that the old-fashioned Oracle SQL: join syntax continues to be supported, and this new enhancements if most important for porting non-Oracle systems into an Oracle database. If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The Definitive Reference” by Rampant TechPress. It’s only $41.95 (I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link: http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1996 - 2009 by
Burleson Enterprises, Inc. All rights reserved.
Oracle® is the registered trademark
of Oracle Corporation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||