STSrid (geometry Data Type)

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

STSrid is an integer representing the spatial reference identifier of the instance.

This property can be modified.

||
|-|
|Applies to: SQL Server ( SQL Server 2008 through current version), Azure SQL Database.|

Syntax


STSrid  

Return Types

SQL Server type: int

CLR type: SqlInt32

Examples

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;  

See Also

STX (geometry Data Type)
STY (geometry Data Type)
OGC Methods on Geometry Instances