Available in versions: Dev (3.18) | Latest (3.17) | 3.16

ST_Z

Applies to ❌ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

This function extracts the Z coordinate of a point. For example:

create.select(stZ(stGeomFromText("POINT (0 0 1)"))).fetch();

The result being, for example

+------+
| ST_Z |
+------+
| 1    |
+------+

Dialect support

This example using jOOQ:

stZ(geometry)

Translates to the following dialect specific expressions:

-- AURORA_POSTGRES, COCKROACHDB, POSTGRES, REDSHIFT
st_z(geometry)

-- ORACLE
geometry.sdo_point.z

-- ACCESS, ASE, AURORA_MYSQL, BIGQUERY, DB2, DERBY, EXASOL, FIREBIRD, H2, HANA, HSQLDB, INFORMIX, MARIADB, MEMSQL, MYSQL, 
-- SNOWFLAKE, SQLDATAWAREHOUSE, SQLITE, SQLSERVER, SYBASE, TERADATA, VERTICA, YUGABYTEDB
/* UNSUPPORTED */

(These are currently generated with jOOQ 3.18, see #10141), or translate your own on our website

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo