Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.72 KB

z-geography-data-type.md

File metadata and controls

58 lines (44 loc) · 1.72 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs
Z (geography Data Type)
Z (geography Data Type)
MladjoA
mlandzic
03/14/2017
sql
t-sql
reference
ignite-2024
Z (geography Data Type)
Z_(geography_Data_Type)_TSQL
Z method
TSQL

Z (geography Data Type)

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

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

Syntax

  
.Z  

Return Types

[!INCLUDEssNoVersion] type: float

CLR type: SqlDouble

Remarks

The value of this property is null if the geography 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 are 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 geography;  
SET @g = geography::STGeomFromText('POINT(-122.34900 47.65100 10.3 12)', 4326);  
SELECT @g.Z;  

See Also

Extended Methods on Geography Instances
M (geography Data Type)
AsTextZM (geography Data Type)