| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: ANSI Join improvement
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
![]() |
![]() |