<SCRIPT LANGUAGE=vbscript >
'洗牌
Dim N,S,D,P
P=54'牌的数量
Set D = CreateObject("Scripting.Dictionary")
do while D.Count<P
Randomize
N=Int(P * Rnd + 1)
if not D.Exists(cstr(N)) then
D.Add cstr(N),cstr(N)
end if
loop
for each K in D.Keys
S=S & K & " "
next
msgbox replace(trim(S)," ",",")
</SCRIPT>
access
select top 5 * from [table] order by rnd(id)
sql server
select top 5 * from [table] order by newid()