ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

SQL implementation differences for the ST_Geometry type

There is little difference between the implementation of spatial SQL (ST_Geometry) implementation for Informix, DB2, Oracle, PostgreSQL, and SQLite. Esri (and IBM, in the case of Informix and DB2) worked to ensure that the standards dictated by the Open Geospatial Consortium (OGC) were applied to the fullest extent possible.

There are, however, two exceptions, neither of which actually breach the OGC standards, but are minor implementation differences of the database management systems.

  • Predicate values

    The predicate functions of ST_Geometry in Informix and PostgreSQL return a t for true and f for false, whereas ST_Geometry in DB2, Oracle, and SQLite use 1 for true and a 0 for false.

    In this example of Informix SQL, the select statement returns only those building IDs for which the ST_Contains function returns t for building lots that contain building footprints.

    select bf.building_id "Building id"
    from buildingfootprints bf, lots
    where st_contains(lot,footprint) = 't';
    
    The same ST_Contains function for an Oracle SELECT statement returns the same building IDs for which 1 is returned when a lot contains a footprint.
    select bf.building_id "Building id"
    from buildingfootprints bf, lots
    where sde.st_contains(lot,footprint) = 1;
    

  • Qualifying functions

    ST_Geometry functions must be qualified with the schema name when executing SQL against tables in enterprise geodatabases in Oracle.

    You can qualify the ST_Geometry functions when executing SQL against tables with ST_Geometry columns in DB2, Informix, and PostgreSQL, but it is not required.

    SQLite does not use schema names, so you do not qualify the ST_Geometry functions when executing SQL against tables with ST_Geometry columns.

Related topics

  • What is the ST_Geometry storage type?

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal