| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Dreaming About Redesigning SQL
paul_geoffrey_brown_at_yahoo.com (Paul G. Brown) wrote in message news:<57da7b56.0310080006.47b550a9_at_posting.google.com>...
> RELATION Dept ( Id Dept_Id KEY, Name String );
> RELATION Emp ( Id Emp_Id KEY, Dept REF(Dept),
> Name PersonName, Salary Money );
>
> RETRIEVE E.Name, DEREF(E.Dept).Name FROM Emp E;
>
> RETRIEVE E.Name FROM Emp E, Dept D
> WHERE DEREF(E.Dept).Id = E.Id AND D.Name = 'shoe';
I'm not sure I understand what DEREF(E.Dept).Id = E.Id predicate is saying. Are you matching Employee id against Department id? Therefore, if ref/deref is indeed just a syntactic sugar around foreign key constraint, what is the syntax for join predicate? Received on Wed Oct 08 2003 - 11:45:43 CDT
![]() |
![]() |