更新时间:2023-02-26 18:39:36
RND将继续返回相同的随机数,直到更改种子为止.尝试在调用中使用GETDATE之类的函数来更改此种子.
RND will continue to return the same random number until the seed is changed. Try to use a function like GETDATE in your call to change this seed.
SELECT RAND( (DATEPART(mm, GETDATE()) * 100000 )<br />
+ (DATEPART(ss, GETDATE()) * 1000 )<br />
+ DATEPART(ms, GETDATE()) );
知道了!我用
Got it!! I use
unsigned char* query = "SELECT TOP 1 WordID FROM Word WHERE Level=''Easy'' ORDER BY Rnd(-10000000*TimeValue(Now())*[WordID]);";
很棒!!!
谢谢您的回答.
It works awesome!!!
Thank You for the answer.
投票总是有帮助的; P.
Voting for the answer always helps ;P .