Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: ANSI Join improvement

Re: ANSI Join improvement

From: Kenneth Downs <knode.wants.this_at_see.sigblock>
Date: Thu, 22 Jun 2006 22:30:46 -0400
Message-Id: <fc0sm3-2dd.ln1@pluto.downsfam.net>


kvnkrkptrck_at_gmail.com wrote:

> At the risk of being labeled a crank...
>
> I'm looking for someone to tell me whether my idea for improving the
> ANSI Join syntax has any merit. One thing about the current syntax
> that often strikes me is I usually join tables on identically named
> columns, and NATURAL joins are perfect for this situation:
>
> EMP = {Dept_id, Emp_id, FName, LName, Salary}
> DEPT = {Dept_id, Name}
>
> SELECT Dept_id "Department ID", Name "Department Name", SUM(Salary)
> "Total Salary"
> FROM DEPT NATURAL INNER JOIN EMP
> GROUP BY Dept_id, Name;
>

Only improvement might be the ability to join by naming a foreign key, in the event that there are two foreign keys between the same two tables.

SELECT ...
  FROM a JOIN B using foreign key b.fk_to_a

-- 
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)
Received on Thu Jun 22 2006 - 21:30:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US