2013-0117
SQL(通用于 SQL Server
SELECT FROM Table ORDER BY NewID()

LINQ
 t in Table orderby Guid.NewGuid()t

Lambda
Table.OrderBy(x=>Guid.NewGuid())


下面是随机取去前n条数据

SQL(通用于 SQL Server

SELECT TOP n FROM Table ORDER BY NewID()< 阅读全文>>
标签: SQL LINQ Lambda 阅读:31899