Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime 17.1 and above
Important
This feature is in Public Preview.
Note
This feature is not available on Databricks SQL Classic warehouses. To learn more about Databricks SQL warehouses, see SQL warehouse types.
Returns the Z coordinate of the input point GEOMETRY value, or NULL if the point is empty or does not have a Z coordinate.
Syntax
st_z ( geoExpr )
Arguments
geoExpr: AGEOMETRYvalue.
Returns
A value of type DOUBLE, equal to the Z coordinate of the input point GEOMETRY value.
The function returns NULL if the input is NULL or if the point is empty.
Error conditions
- If the value of
geoExpris not a point, the function returns ST_INVALID_ARGUMENT.INVALID_TYPE.
Examples
-- Returns the Z coordinate of a non-empty point geometry with a Z coordinate.
> SELECT st_z(st_geomfromtext('POINT Z (1 2 3)'));
3.0
-- Returns the Z coordinate of a non-empty point geometry without a Z coordinate.
> SELECT st_z(st_geomfromtext('POINT M (2 3 4)'));
NULL
-- Returns `NULL` for an empty point geometry.
> SELECT st_z(st_geomfromtext('POINT ZM EMPTY'));
NULL