摘要: 以下示例从表[tableName]中读取10条随机记录的SQL语句1 Access select top 10 * from [tableName] order by rnd(id) select top 10 * from [tableName] where [cond] order by rnd(id) 注:id是自增长类型的主键2 SQL Server select Top 10 * From [tableName] order By NewID()另外:还有种方法:先获取总记录数,然后取1~总数之间的随机数,rs.move,不过这种方法有点罗嗦,在此不推荐。 3 MySQL selec 阅读全文
posted @ 2011-04-08 23:26 lear 阅读(586) 评论(0) 推荐(0) 编辑