ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • 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 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

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Update values in an ST_Geometry spatial column

The SQL UPDATE statement alters the values in a spatial column just as it does any other type of attribute. Typically, spatial attribute data must be retrieved from the table, altered in a client application, then returned to the server.

The following SQL statements illustrate how to fetch and update the spatial data from one row in the hazardous_sites table for each of the supported databases:

  1. Open an SQL editor and connect to your database.

    Connect using an account that has privileges to update the table.

  2. Update the value stored in an ST_Geometry column.
    • Oracle
      UPDATE hazardous_sites 
       SET location = sde.st_geometry('point (18 57)', 4326) 
       WHERE site_id = 102;
      
    • PostgreSQL
      UPDATE hazardous_sites 
       SET location = st_point('point (18 57)', 4326) 
       WHERE site_id = 102;
      
    • SQLite
      UPDATE hazardous_sites 
       SET location = st_point('point (18 57)', 4326) 
       WHERE site_id = 2;
      
    • IBM DB2
      UPDATE hazardous_sites 
       SET location = db2gse.st_pointfromtext('point(18 57)', 1) 
       WHERE site_id = 102
      
    • IBM Informix
      UPDATE hazardous_sites 
       SET location = st_pointfromtext('point(18 57)', 1) 
       WHERE site_id = 102
      

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal