Home » SQL & PL/SQL » SQL & PL/SQL » Is Equi Join ANSI Standard
Is Equi Join ANSI Standard [message #12778] Fri, 04 June 2004 22:55 Go to next message
ramesh
Messages: 123
Registered: August 2000
Senior Member
Before 1999 there is no ANSI standard Joins,Equi Join will Comes under this Condition,Is it Correct?
Re: Is Equi Join ANSI Standard [message #12783 is a reply to message #12778] Sat, 05 June 2004 13:12 Go to previous message
Barbara Boehmer
Messages: 9106
Registered: November 2002
Location: California, USA
Senior Member
An equi join can be done in either ANSI standard syntax or non-ANSI standard syntax.

Oracle versions 9i and 10g use ANSI standard joins. Oracle version 8i did not use ANSI standard joins.

In 9i and 10g, an ANSI standard equi join, with or without the optional keyword INNER, would be:

scott@ORA92> SELECT ename, dname
  2  FROM emp INNER JOIN dept ON emp.deptno = dept.deptno
  3  /

ENAME      DNAME
---------- --------------
SMITH      RESEARCH
ALLEN      SALES
WARD       SALES
JONES      RESEARCH
MARTIN     SALES
BLAKE      SALES
CLARK      ACCOUNTING
SCOTT      RESEARCH
KING       ACCOUNTING
TURNER     SALES
ADAMS      RESEARCH
JAMES      SALES
FORD       RESEARCH
MILLER     ACCOUNTING

14 rows selected.


In Oracle 8i and before, the following non-ANSI standard syntax, which can still be used in Oracle 9i, would be used for an equi join:

scott@ORA92> SELECT ename, dname
  2  FROM   emp, dept
  3  WHERE  emp.deptno = dept.deptno
  4  /

ENAME      DNAME
---------- --------------
SMITH      RESEARCH
ALLEN      SALES
WARD       SALES
JONES      RESEARCH
MARTIN     SALES
BLAKE      SALES
CLARK      ACCOUNTING
SCOTT      RESEARCH
KING       ACCOUNTING
TURNER     SALES
ADAMS      RESEARCH
JAMES      SALES
FORD       RESEARCH
MILLER     ACCOUNTING

14 rows selected.
Previous Topic: ORA-01401 on insert value with same length as varchar2
Next Topic: DECODE/CASE tricky situation
Goto Forum:
  


Current Time: Sun Apr 19 12:56:28 CDT 2026