FKEY order
The following query shows the selection process for ordering based on FKEY information:
SELECT ... FROM dept, div, emp
WHERE emp.deptno=dept.deptno AND dept.divno=div.divno
The schema contains the following relationships. Each relationship is a pair of PKEY, FKEY tables: (dept,emp) and (div,dept).
• SELECT div as the first table to be processed.
• SELECT dept as the next table.
• SELECT emp as the next table.
• The query is processed in the order: div,dept,emp