1.MS SQL Server,随机查询20条
select top 20 * from 表名order by newid()
2.My SQL:,随机查询20条
select * from 表名 order by rand() limit 20
select top 10 * from(select * from table1
union all
select * from table2) t
order by newid()
欢迎分享,转载请注明来源:内存溢出
1.MS SQL Server,随机查询20条
select top 20 * from 表名order by newid()
2.My SQL:,随机查询20条
select * from 表名 order by rand() limit 20
select top 10 * from(select * from table1
union all
select * from table2) t
order by newid()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)