HasZ (geography Data Type)

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2012)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns 1 (true) if a spatial object contains at least one Z value; otherwise, it returns 0 (false).

Syntax


.HasZ  

Return Types

SQL Server return type: bit

CLR return type: Boolean

Remarks

Examples

DECLARE @p GEOGRAPHY = 'Point(1 1 1 1)'  
SELECT @p.HasZ   
--Returns: 1 (true)  

See Also

Extended Methods on Geography Instances
Z (geography Data Type)