在sql server中,从数据表中随机取出n条记录,使用以下SQL语句:
select top n * from tableName order by newid()
在oralce中,从数据表中随机取出n条记录,使用以下SQL语句
select * from (select tableName .*,dbms_random.random as randomKey from tableName order by randomKey)
where rownum<=n
Let life be beautiful like summer flowers and death like autumn leaves.