| title | STSrid (geometry Data Type) | ||
|---|---|---|---|
| description | STSrid (geometry Data Type) | ||
| author | MladjoA | ||
| ms.author | mlandzic | ||
| ms.date | 08/03/2017 | ||
| ms.service | sql | ||
| ms.subservice | t-sql | ||
| ms.topic | reference | ||
| ms.custom |
|
||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
||
| monikerRange | =azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric-sqldb |
[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance FabricSQLDB]
STSrid is an integer representing the spatial reference identifier of the instance.
This property can be modified.
STSrid
[!INCLUDEssNoVersion] type: int
CLR type: SqlInt32
The first example creates a geometry instance with the SRID value 13 and uses STSrid to confirm the SRID.
DECLARE @g geometry;
SET @g = geometry::STGeomFromText('POLYGON((0 0, 3 0, 3 3, 0 3, 0 0))', 13);
SELECT @g.STSrid; The second example uses STSrid to change the SRID value of the instance to 23 and then confirms the modified SRID value.
SET @g.STSrid = 23;
SELECT @g.STSrid; STX (geometry Data Type)
STY (geometry Data Type)
OGC Methods on Geometry Instances