June 26, 2009 at 4:27 am
real is actually a synonym for float(24) which has a precision of only 7 digits.
June 26, 2009 at 7:12 am
SQL 2005 actually displays the answer as 1234567936. I tested this to make sure. The scientific notation might only be displayed depending on your local configuration options.
June 26, 2009 at 7:41 am
In my environment, SQL 2005 & SQL 2008 display it the same way as the correct answer.
June 26, 2009 at 7:58 am
Suppose it depends on which query tool you use. If you use the one built into Microsoft SQL Server Management Studio, it does display in scientific notation.
SQLDBX displays as 1234567936
It's probably SQLDBX that is translating it back into a non-scientific notation number.
June 26, 2009 at 8:15 am
The questions are almost always built on the native tools unless noted.
your client tool will indeed translate things.
June 27, 2009 at 9:47 pm
At least the correct answer wasn't "close" to all the other answers because none of the answers are correct in 2k.
1.2345679E+9
Before you start beating the "latest version" drum on that... I can't put my hands on the URL but I remember seeing a recent poll where 67% of all data centers that took part in the survey still had at least 1 server running SQL Server 2000.
With that in mind, I believe that it's still worthwhile listing what version of SQL Server the question is for.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 28, 2009 at 11:25 pm
steve.saunders (6/26/2009)
real is actually a synonym for float(24) which has a precision of only 7 digits.
You are right! Real and float(24) only has a precision of 7 seven digits. The answer is correct but the explanation is a little bit misleading. At least if MS is following the ISO standard 😀
The ISO synonym for real is float(24).
http://msdn.microsoft.com/en-us/library/ms173773.aspx
/Håkan Winther
/Håkan Winther
MCITP:Database Developer 2008
MCTS: SQL Server 2008, Implementation and Maintenance
MCSE: Data Platform
June 29, 2009 at 10:58 am
in SQL server 2005 result is 1.234568E+09
while in SQL 2000 result is 1.2345679E+9
Does it make any difference ?
SQL DBA.
June 29, 2009 at 6:24 pm
SanjayAttray (6/29/2009)
in SQL server 2005 result is 1.234568E+09while in SQL 2000 result is 1.2345679E+9
Does it make any difference ?
Heh... only if you're answering a QOD and only if both answers are available in the multiple guess section.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 30, 2009 at 6:51 am
SanjayAttray (6/29/2009)
in SQL server 2005 result is 1.234568E+09while in SQL 2000 result is 1.2345679E+9
Does it make any difference ?
It is dependant on the client tool
QA shows 1.2345679E+9 SQL2000 & SQL2005
SSMS shows 1.234568E+09 SQL2000 & SQL2005
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply