STBoundary (geometry Data Type)

Returns the boundary of a geometry instance.


.STBoundary ()

Return Types

SQL Server return type: geometry

CLR return type: SqlGeometry


The following example uses STBoundary() to create a LineStringgeometry instance. It then returns the boundary of the LineString.

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

See Also

Other Resources