Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.77 KB

z-geometry-data-type.md

File metadata and controls

59 lines (43 loc) · 1.77 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
Z (geometry Data Type)
Z (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
Z (geometry Data Type)
Z_(geometry_Data_Type)_TSQL
Z (geometry Data Type)
TSQL

Z (geometry Data Type)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]

The Z (elevation) value of the instance. The semantics of the elevation value are user-defined.

Syntax

  
.Z  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Return Types

[!INCLUDEssNoVersion] type: float

CLR type: SqlDouble

Remarks

The value of this property will be null if the geometry instance is not a point, as well as for any Point instance for which it is not set.

This property is read-only.

Z-coordinates are not used in any calculations made by the library and is not carried through any library calculations.

Examples

The following example creates a Point instance with Z (elevation) and M (measure) values and uses Z to fetch the Z value of the instance.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('POINT(1 2 3 4)', 0);  
SELECT @g.Z;  

See Also

M (geometry Data Type)
AsTextZM (geometry Data Type)
Extended Methods on Geometry Instances