Oracle Using SDO JOIN: Difference between revisions

From WickyWiki
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 ..."
 
m 1 revision
 
(No difference)

Latest revision as of 07:26, 5 July 2013

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
  ;