学到了如何在数据库中寻找随机记录的方法:利用 TOP 和 NewID() 语句
Select top (@top) tables.fields
FROM MytablesJoinedTogether
Where stuff = otherstuff
Order by newid()
就可以随机得到前top条记录了。。。
Thursday, January 08, 2009
Subscribe to:
Post Comments (Atom)
茌成的博客 (AKA joychester) IF you think it is helpful, Take it away for free :)
No comments:
Post a Comment