Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RAND (SQL Server Compact)
Collapse the table of content
Expand the table of content

RAND (SQL Server Compact)

Returns a random float value from 0 through 1.


RAND ( [ seed ] ) 

seed

An integer expression that can be implicitly converted to int, which gives the seed or start value.

The following example returns random float numbers based on three different seed values.

CREATE TABLE Random (Seed1 float, Seed5 float, Seed10 float)
INSERT INTO Random Values (RAND(1), RAND(5), RAND(10))
SELECT * FROM Random
Show:
© 2015 Microsoft