程序笔记
随心而记

WITH TT AS
(SELECT *,rownum = row_number() over(partition by [分组字段] order by newid()) FROM 表名)
SELECT * FROM TT
where rownum = 1

posted on 2009-06-25 11:52    阅读(1192)  评论(0编辑  收藏  举报