Access:
CLng(Rnd(种子数字)*1000000)
 
SQL Server
ceiling(rand(abs(checksum(newid())))*1000000)