Select TOP 50 Rand() as shuijshu,* Into Cursor kuaijimokao_2 From tiku_jiangsu
Select TOP 50 Rand(-1) as shuijshu,* Into Cursor kuaijimokao_2 From tiku_jiangsu
同样是使用的rand()函数,出来的结果,居然还不同,
上面一句,每一条记录中 shuijshu的值都不同
下面一行,所有记录中 shuijshu的值都相同.
什么原因了?
我希望用下面一句,但不希望所有记录的值都相同
------解决方案--------------------------------------------------------
SELECT TOP 50 * FROM (;
Select Rand() as shuijshu,* From tt ) a ORDER BY shuijshu