2013年4月17日

SQL: 随机从数据库取值

摘要: select ArticleId, Title,CreateDate from (SELECT top 2 * FROM [Article] Where ArticleId <10 Order By NewId() ) AS AUNION select ArticleId,Title,CreateDate from (SELECT top 8 * FROM [Article] Where ArticleId >10 Order By NewId() ) AS B//*********************************************************** 阅读全文

posted @ 2013-04-17 11:42 水行者 阅读(216) 评论(0) 推荐(0) 编辑

导航