I have a table with field Latitude
of real
datatype.
When I query it from SQL Server Management Studio, I get the following:
select Latitude from Location where ID = 123
As you can see a value of 26.09418
is returned. However, if I write a simple console in .NET and retrieve the data from the database, it returns 26.094183
. It brings back an additional significant number.
Why the mismatch? Is there a way to stop SSMS from doing it?
For reference, here is the c# code to retrieve the data (using Dapper):
string sql = "select Latitude from Location where ID = 123";
using (var connection = new SqlConnection(conn)) {
var location = connection.QueryFirst<Location>(sql);
Console.WriteLine(location.Latitude);
}
class Location { public Single Latitude { get; set; } }