CREATE TABLE [dbo].[tGeoTest](
[Id] [int] IDENTITY(1,1) NOT NULL,
[name] [nchar](200) NULL,
[geo] [geography] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
insert into tGeoTest (name,geo) values ('Eiffelturm',geography::Point(48.858260200000004, 2.2944990543196795 , 4326))
insert into tGeoTest (name,geo) values ('Stefansturm',geography::Point(48.209133, 16.3724786 , 4326))
DECLARE @geo1 geography=(select geo from tGeoTest where id=1)
DECLARE @geo2 geography=(select geo from tGeoTest where id=2)
select @geo1.STDistance(@geo2)/1000 as Distanz