I am using the below query in SQL Server.
declare @dt float
set @dt = 1079938.05
select @dt AS Val,Convert(nvarchar(20),@dt) AS NVal, len(@dt) AS Len
Its output is
Val NVal Len
1079938.05 1.07994e+006 12
My questions are:
- 'Val' column shows right value.
- 'NVal' column shows strange value please explain us why it shows like this?
- 'Len' shows length and its actual length is 10 but it shows us 12. Please explain why it shows 12 instead of 10.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…