Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 1.57 KB

stsrid-geography-data-type.md

File metadata and controls

60 lines (46 loc) · 1.57 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs
STSrid (geography Data Type)
STSrid (geography Data Type)
MladjoA
mlandzic
03/14/2017
sql
t-sql
reference
ignite-2024
STSrid (geography Data Type)
STSrid_TSQL
STSrid method
TSQL

STSrid (geography Data Type)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance FabricSQLDB]

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

Syntax

  
.STSrid  

Return Types

[!INCLUDEssNoVersion] type: int

CLR type: SqlInt32

Remarks

This property can be modified.

Examples

The first example creates a geography instance with the SRID value 4326 (WGS84) and uses STSrid to confirm the SRID.

DECLARE @g geography;  
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);  
SELECT @g.STSrid;  

The second example uses STSrid to change the SRID value of the instance to 4267 (NAD27) and then confirms the modified SRID value.

SET @g.STSrid = 4267;  
SELECT @g.STSrid;  

See Also

OGC Methods on Geography Instances
Spatial Reference Identifiers (SRIDs)