sql 随机抽取记录

sql 随机抽取记录

原来的access数据库的语句:

set srst=conn.execute("select top 2 wt_title from wd_tag  order by rnd(-(wt_id +"&rnd()&"))    ")

改后的语句

set srst=conn.execute("select top 2 wt_title,NewID() as random  from wd_tag  order by random    ")

More...