SQL: 随机从数据库取值
select ArticleId, Title,CreateDate from (SELECT top 2 * FROM [Article] Where ArticleId <10 Order By NewId() ) AS A
UNION
select ArticleId,Title,CreateDate from (SELECT top 8 * FROM [Article] Where ArticleId >10 Order By NewId() ) AS B
//**********************************************************************************************
select * from (SELECT top 2 *,NewId() As RandromX FROM [Article] Where ArticleId < 100 Order By RandromX) A
UNION ALL
select * from (SELECT top 8 *,NewId() As RandromX FROM [Article] Where ArticleId > 200 Order By RandromX) B