Export (0) Print
Expand All

STSrid (geography Data Type)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

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

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

SQL Server type: int

CLR type: SqlInt32

This property can be modified.

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;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft