如果先把表中所有数据都先取出来存入一个数组的话肯定是可以实现的,不过我考虑这样子好像有点儿太浪费内存了.
希望我有把意思表达清楚,我现在只能用数组这个方法先了,还请达人们指点呀!!
8 个解决方案
#1
不会吧,怎么没人理我呀?难道是我没有说清楚吗?
up!
up!
#2
select top 1 * from tb order by newid()
#3
随机排序:
select * from t order by newid()
select * from t order by newid()
#4
select top 1 * from yourtable order by newid()
#5
select top 1 * from 表 order by newid()
#6
select top 1 * from 表 order by newid()
#7
多谢诸位了,感激!
#8
好好好
#1
不会吧,怎么没人理我呀?难道是我没有说清楚吗?
up!
up!
#2
select top 1 * from tb order by newid()
#3
随机排序:
select * from t order by newid()
select * from t order by newid()
#4
select top 1 * from yourtable order by newid()
#5
select top 1 * from 表 order by newid()
#6
select top 1 * from 表 order by newid()
#7
多谢诸位了,感激!
#8
好好好