日期:2014-05-17 浏览次数:20365 次
create table [a]([ID] int)
insert a
select 1 union all
select 2 union all
select 3 union all
select 4 union all
select 5 union all
select 6 union all
select 7 union all
select 8 union all
select 9 union all
select 10
select id,case when id<=5 then 0 else 1 end as num from a order by num ,id desc
List<int> list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
var query = from i in list
orderby (i-1) / 5, i descending
select i;
foreach (var i in query)
{
Console.WriteLine(i);
}
Console.ReadLine();