select top 的速度,最快

SELECT TOP 1 *
FROM tb
WHERE id<=abs(checksum(newid()))%(select rowcnt from SYSINDEXES where id=object_id('tb') and indid<2 )+1
ORDER BY ID DESC

posted on 2010-05-21 13:29  风乔  阅读(193)  评论(0编辑  收藏  举报

导航