Share via


STBoundary (geometry Data Type)

Returns the boundary of a geometry instance.

Syntax

.STBoundary ()

Return Types

SQL Server return type: geometry

CLR return type: SqlGeometry

Examples

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