Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.74 KB

ststartpoint-geometry-data-type.md

File metadata and controls

57 lines (42 loc) · 1.74 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
STStartPoint (geometry Data Type)
STStartPoint (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
STStartPoint_TSQL
STStartPoint (geometry Data Type)
STStartPoint (geometry Data Type)
TSQL
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current||=fabric

STStartPoint (geometry Data Type)

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

Returns the start point of a geometry instance.

Syntax

  
.STStartPoint ( )  

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

Return Types

[!INCLUDEssNoVersion] return type: geometry

CLR return type: SqlGeometry

Open Geospatial Consortium (OGC) type: Point

Remarks

STStartPoint() is the equivalent of STPointN (1).

Examples

The following example creates a LineString instance and uses STStartPoint() to retrieve the start point of the instance.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 2 2, 1 0)', 0);  
SELECT @g.STStartPoint().ToString();  

See Also

STPointN (geometry Data Type)
OGC Methods on Geometry Instances