Export (0) Print
Expand All

HasZ (geography Data Type)

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

Applies to: SQL Server (SQL Server 2012 through current version), Azure SQL Database.

SQL Server return type: bit

CLR return type: Boolean

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

Community Additions

ADD
Show:
© 2014 Microsoft