Get SRID from Geometry Field – SQL Server Guide

geometrysql serversrid

What is the function for getting SRID from Geometry field.

I have inserted a shapefile into SQL Server table with a Geometry field defined. I know the projection of shapefile is Swreff99_1800 (EPSG:3011).

Now my question is How I get this SRID:3011 by using some OGC method of the geometry field?

Best Answer

Is this what you are looking for?

select distinct SP_GEOMETRY.STSrid from dbo.MYTABLE

This will give you a table with the different SRID's used in the table dbo.MYTABLE