Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 1.7 KB

stsrid-geometry-data-type.md

File metadata and controls

61 lines (47 loc) · 1.7 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs monikerRange
STSrid (geometry Data Type)
STSrid (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
ignite-2024
STSrid (geometry Data Type)
STSrid_TSQL
STSrid (geometry Data Type)
TSQL
=azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric

STSrid (geometry Data Type)

[!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.

Syntax

  
STSrid  

Return Types

[!INCLUDEssNoVersion] 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