title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | monikerRange | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
STEnvelope (geometry Data Type) |
STEnvelope (geometry Data Type) |
MladjoA |
mlandzic |
08/03/2017 |
sql |
t-sql |
reference |
|
|
|
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current |
[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]
Returns the minimum axis-aligned bounding rectangle of the instance.
STEnvelope ( )
[!INCLUDEssNoVersion] return type: geometry
CLR return type: SqlGeometry
The following example uses STGeomFromText()
to create a LineString
instance from (0,0) to (2,3), and uses STEnvelope()
to return the bounding box of the LineString
.
DECLARE @g geometry;
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 2 3)', 0);
SELECT @g.STEnvelope().ToString();