O'Reilly logo

OCA Oracle Database 11g: SQL Fundamentals I: A Real-World Certification Guide by Steve Ries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using ANSI standard joins

In order to join two tables, we will utilize the basic structure of a SELECT statement; but, we must add a few qualifiers.

Understanding the structure and syntax of ANSI join statements

When we join two tables, we add a WHERE clause that qualifies that the common columns between the tables are equivalent. The following is the syntax tree for an ANSI-compliant join:

SELECT column1, column2, ...
FROM table1, table2
WHERE table1.common_column = table2.common_column;

While the join syntax is similar in many ways to a typical select statement, we notice some differences.

  • As you might expect, since we are selecting data from two tables, both table names are specified in the FROM clause, separated by commas
  • The syntax of the WHERE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required