select top 10 * into #t1 from yourtable where col='条件1' order by newid()
select top 10 * into #t2 from yourtable where col='条件2' order by newid()
select top 10 * into #t3 from yourtable where col='条件3' order by newid()select * from #t1
union
select * from #t2
union
select * from #t3
select top 10 * into #t2 from yourtable where col='条件2' order by newid()
select top 10 * into #t3 from yourtable where col='条件3' order by newid()select * from #t1
union
select * from #t2
union
select * from #t3
drop table #t1
drop table #t2
drop table #t3
select * from (
select * from (
select top 10 * from tablename
where 条件A
order by newid()
) as t1
union
select * from (
select top 10 * from t_data
where 条件B
order by newid()
) as t2
union
select * from (
select top 10 * from t_data
where 条件C
order by newid()
) as t3
) as x
select * from (
select top 10 * from tablename
where 条件A
order by newid()
) as t1
union
select * from (
select top 10 * from t_data
where 条件B
order by newid()
) as t2
union
select * from (
select top 10 * from t_data
where 条件C
order by newid()
) as t3
) as x
order by newid() ---------最后次序打乱
union all
select * from (select top 10 * from 表 where 科目='语文' order by newid()) a
union all
select * from (select top 10 * from 表 where 科目='英语' order by newid()) a
union all
select * from (select top 10 * from 表 where 科目='语文' order by newid()) a
union all
select * from (select top 10 * from 表 where 科目='英语' order by newid()) a
union all
select * from (select top 10 * from 表 where 科目='语文' ) a
union all
select * from (select top 10 * from 表 where 科目='英语' ) a ) b order by newid()
union all
select col1,col2,... from (select top 10 *,newid() as IDD from yourtable where 科目='语文') BB
union all
select col1,col2,... from (select top 10*,newid() as IDD from yourtable where 科目='英语') CC
select topic from (select top 20 topic , newid() as id from exams where 科目 = '数学' order by id) t
union
select topic from (select top 10 topic , newid() as id from exams where 科目 = '语文' order by id) t2
union
select topic from (select top 15 topic , newid() as id from exams where 科目 = '英语' order by id) t3
or if you are using ADO.NET, you could utilize the NextRecordset method of Recordset object