(select top 1 percent A from B order by newid())
我想从表B中获取随机记录
答案 0 :(得分:2)
像这样使用......
select * from B where A in
(select top 1 percent A from B order by newid())
OR
select top 1 percent A from B order by newid()
每次都会给你随机的行......
编辑: