Oracle Using SDO JOIN

From WickyWiki
Revision as of 07:26, 5 July 2013 by Admin (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When joining tables based on their topological relationship it is possible to use SDO_RELATE, however, SDO_RELATE seems better suited to filter or find values in a table whereas SDO_JOIN should be used when joining tables:

Source:

An example of joining an AREA and POINT table:

SELECT /*+ ordered */
  a.ID
  , p.ID  
FROM TABLE(SDO_JOIN(
  'AREA', 'GEOMETRY', 
  'POINT', 'GEOMETRY', 
  'mask=ANYINTERACT')) pa
  , AREA a
  , POINT p
WHERE pa.rowid1 = a.rowid
  AND pa.rowid2 = p.rowid
  ;