Skip to content
 

Random Number

The following SQL script will generate a single random number:

SELECT CAST(1000000-CEILING(RAND()* 899001) + (DATEPART(ss, GETDATE()) * 1000 ) + DATEPART(ms, GETDATE()) as int)


Popular search terms:

2 Comments

  1. Anonymous says:

    how to count hours based on date

post a comment OR Post Your Question on our ASK! Community!