October 24, 2014 at 3:46 am
SELECT
RAND(100)
, RAND(7)
, RAND()
UNION ALL
SELECT
RAND(100)
, RAND(7)
, RAND()
UNION ALL
SELECT
RAND(100)
, RAND(7)
, RAND()
;
go
returns
---------------------- ---------------------- ----------------------
0.715436657367485 0.713703791040473 0.945719735396816
0.715436657367485 0.713703791040473 0.945719735396816
0.715436657367485 0.713703791040473 0.945719735396816
(3 row(s) affected)
Why, it is not supposed to ??
October 26, 2014 at 5:26 pm
TomThomson (10/23/2014)
Amusing question; the use of RAND is an interesting distraction for a question that is really about UNION ALL and nothing else.
I agree! It would have been UNION instead of a UNION ALL to make it less obvious.
/Håkan Winther
MCITP:Database Developer 2008
MCTS: SQL Server 2008, Implementation and Maintenance
MCSE: Data Platform
January 26, 2015 at 3:26 pm
Thanks for the question.
Viewing 3 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy