acc数据库版
- SELECT TOP 1 * FROM KS_Article where tid="20118558523167" ORDER BY right(cstr(rnd(-int(rnd(-timer())*100+id)))*1000,2)
把tid=”20118558523167” 中的20118558523167换成你栏目的id就好
mssql数据库版
- SELECT TOP 1 * FROM KS_Article where tid="20118558523167" ORDER BY NEWID()