access 随机选取数据
access随机读取数时 用order by rnd(id) 发现每次获取的数据顺序都是一致的,必须要加上随机数才可以,如下:
Random r = new Random();
int sj = r.Next(100,10000000);
sqlstr = "select top 20 * from question order by rnd("+-sj+"*id)";
sqlserver 随机数:order by NEWID();