SQL從數據庫中隨機取數據(原文轉自博客園)

如何隨機取記錄?(MSSQL、Access、MySql)html 一、數據量少的時候能夠使用sql自帶的newid()函數 select top 7 from table order by newid() select top 5 a.columName from (select distinct columName from tableName) a order by newid() 算法 二、
相關文章
相關標籤/搜索