OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.1

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.1
    iconOceanBase Database
    SQL - V 4.3.1
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    SDO_GEOMETRY attribute access

    Last Updated:2026-04-15 08:25:15  Updated
    share
    What is on this page
    SDO_GEOMETRY.SDO_GTYPE
    SDO_GEOMETRY.SDO_SRID
    SDO_GEOMETRY.SDO_POINT
    SDO_GEOMETRY.SDO_ELEM_INFO
    SDO_GEOMETRY.SDO_ORDINATES

    folded

    share

    SDO_GEOMETRY is a complex data type with several intrinsic attributes that can be accessed in PL/SQL.

    SDO_GEOMETRY.SDO_GTYPE

    SDO_GEOMETRY.SDO_GTYPE indicates the geometry type code of a geometry object.

    Example

    obclient [SYS]> SELECT SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(10, 50, NULL), NULL, NULL).SDO_GTYPE AS test_sdo_gtype FROM dual;
    

    The return result is as follows:

    +----------------+
    | TEST_SDO_GTYPE |
    +----------------+
    |           2001 |
    +----------------+
    1 row in set
    

    SDO_GEOMETRY.SDO_SRID

    SDO_GEOMETRY.SDO_SRID indicates the spatial reference system identifier (SRID) of a geometry object.

    Example

    obclient [SYS]> SELECT SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL).SDO_SRID AS test_sdo_srid FROM dual;
    

    The return result is as follows:

    +---------------+
    | TEST_SDO_SRID |
    +---------------+
    |          4326 |
    +---------------+
    1 row in set
    

    SDO_GEOMETRY.SDO_POINT

    SDO_GEOMETRY.SDO_POINT indicates the point coordinates of a geometry object, including the X, Y, and optional Z coordinates. You can also access SDO_POINT sub-attributes of SDO_GEOMETRY to get these coordinate values.

    SDO_POINT provides the following sub-attributes:

    • SDO_GEOMETRY.SDO_POINT.X: the X coordinate of the geometry object.
    • SDO_GEOMETRY.SDO_POINT.Y: the Y coordinate of the geometry object.
    • SDO_GEOMETRY.SDO_POINT.Z: the Z coordinate of the geometry object, which is optional. Not all geometry objects have a Z coordinate value.

    Examples

    • Access the SDO_POINT attribute that contains the X, Y, and Z coordinates.

      obclient [SYS]> SELECT SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL).SDO_POINT AS test_sdo_point FROM dual;
      

      The return result is as follows:

      +------------------------------+
      | TEST_SDO_POINT               |
      +------------------------------+
      | SDO_POINT_TYPE(12, 14, NULL) |
      +------------------------------+
      1 row in set
      
    • Access the SDO_POINT.X sub-attribute.

      obclient [SYS]> SELECT SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL).SDO_POINT.X AS test_sdo_point_x FROM dual;
      

      The return result is as follows:

      +------------------+
      | TEST_SDO_POINT_X |
      +------------------+
      |               12 |
      +------------------+
      1 row in set
      
    • Access the SDO_POINT.Y sub-attribute.

      obclient [SYS]> SELECT SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL).SDO_POINT.Y AS test_sdo_point_y FROM dual;
      

      The return result is as follows:

      +------------------+
      | TEST_SDO_POINT_Y |
      +------------------+
      |               14 |
      +------------------+
      1 row in set
      
    • Access the SDO_POINT.Z sub-attribute.

      obclient [SYS]> SELECT SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL).SDO_POINT.Z AS test_sdo_point_z FROM dual;
      

      The return result is as follows:

      +------------------+
      | TEST_SDO_POINT_Z |
      +------------------+
      |             NULL |
      +------------------+
      1 row in set
      

    SDO_GEOMETRY.SDO_ELEM_INFO

    SDO_GEOMETRY.SDO_ELEM_INFO indicates the geometric element information of a geometry object, such as the start and end point indices of a line segment or polygon.

    Example

    obclient [SYS]> SELECT SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY(10,105, 15,105, 20,110, 10,110, 10,105)).SDO_ELEM_INFO AS test_sdo_elem_info FROM dual;
    

    The return result is as follows:

    +---------------------------------+
    | TEST_SDO_ELEM_INFO              |
    +---------------------------------+
    | SDO_ELEM_INFO_ARRAY(1, 1003, 1) |
    +---------------------------------+
    1 row in set
    

    SDO_GEOMETRY.SDO_ORDINATES

    SDO_GEOMETRY.SDO_ORDINATES indicates the coordinate value array of a geometry object.

    Example

    obclient [SYS]> SELECT SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY(10,105, 15,105, 20,110, 10,110, 10,105)).SDO_ORDINATES AS test_sdo_ordinates FROM dual;
    

    The return result is as follows:

    +-----------------------------------------------------------------+
    | TEST_SDO_ORDINATES                                              |
    +-----------------------------------------------------------------+
    | SDO_ORDINATE_ARRAY(10, 105, 15, 105, 20, 110, 10, 110, 10, 105) |
    +-----------------------------------------------------------------+
    1 row in set
    

    Previous topic

    Create a spatial column
    Last

    Next topic

    Overview
    Next
    What is on this page
    SDO_GEOMETRY.SDO_GTYPE
    SDO_GEOMETRY.SDO_SRID
    SDO_GEOMETRY.SDO_POINT
    SDO_GEOMETRY.SDO_ELEM_INFO
    SDO_GEOMETRY.SDO_ORDINATES