Oracle Using SDO JOIN

From WickyWiki
Revision as of 08:36, 11 January 2012 by Wilbert (talk | contribs) (Created page with "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 ...")
(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
  ;