Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.27 KB

stisempty-geometry-data-type.md

File metadata and controls

49 lines (37 loc) · 1.27 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
STIsEmpty (geometry Data Type)
STIsEmpty (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
STIsEmpty_TSQL
STIsEmpty (geometry Data Type)
STIsEmpty (geometry Data Type)
TSQL
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

STIsEmpty (geometry Data Type)

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

Returns 1 if a geometry instance is empty. Returns 0 if a geometry instance is not empty.

Syntax

  
.STIsEmpty ( )  

Return Types

[!INCLUDEssNoVersion] return type: bit

CLR return type: SqlBoolean

Examples

The following example creates an empty geometry instance and uses STIsEmpty() to test whether the instance is empty.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('POLYGON EMPTY', 0);  
SELECT @g.STIsEmpty();  

See Also

OGC Methods on Geometry Instances