随机查询一条数据

1:
SELECT TOP 1 P.* FROM [ProxyServer] P JOIN (SELECT RAND()*100 AS Nid) T ON P.[Id]>T.Nid WHERE P.Cookie<>'' and P.CompanyID=1069 and P.ProductCode='TPCX'
2:
  SELECT TOP 1 * FROM [ProxyServer] WHERE Cookie<>'' and CompanyID=1069 and ProductCode='TPCX' order by NEWID()

  

原文地址:https://www.cnblogs.com/XuPengLB/p/5681743.html