你的意思是要把number从大到小排列吗?
是的话这样做
用“冒泡法”排序
我和起来写
<%
for i=1 to 5
Randomize '打乱随机数
number=Int((n*Rnd)+1) 'number为1到n的随机数,n就是你的数据库记录数
select * from 你的表 where 编号=number '从数据库取出记录
n(i)=number '把5个number付值给变量n(x)
next
for i=1 to 5
for j=1 to 5
if n(i)<n(j) then swap n(i),n(j)
next
next
%>
此时,n(1)>n(2)>n(3)>n(4)>n(5)
在线写的。不知对不对,试一试吧