DataTable tb1 = tb1.Clone();//复制结构 DataTable tb2 = tb1.Clone(); for (int i = 0; i < 50000; i++) { tb1.ImportRow(tb1.Rows[i]); } for (int i = 50000; i < 100000; i++) { tb2.ImportRow(tb1.Rows[i]); }
SELECT TOP 页大小 * FROM TestTable WHERE (ID NOT IN (SELECT TOP 页大小*页数 id FROM 表 ORDER BY id)) ORDER BY IDSELECT TOP 页大小 * FROM TestTable WHERE (ID > (SELECT MAX(id) FROM (SELECT TOP 页大小*页数 id FROM 表 ORDER BY id) AS T)) ORDER BY ID http://topic.csdn.net/u/20100812/15/1455d031-d9cc-44aa-ae7b-69802d922635.html
有点小错误,重贴 读出全部记录到tb表 DataTable tb1 = tb.Clone();//复制结构 DataTable tb2 = tb.Clone(); for (int i = 0; i < 50000; i++) { tb1.ImportRow(tb1.Rows[i]); } for (int i = 50000; i < 100000; i++) { tb2.ImportRow(tb1.Rows[i]); } //排序 DataView dv = tb1.DefaultView; dv.Sort = "字段 ASC,字段2 desc"; tb1=dv.ToTable(tb1);
DataTable tb2 = tb1.Clone(); for (int i = 0; i < 50000; i++)
{
tb1.ImportRow(tb1.Rows[i]);
}
for (int i = 50000; i < 100000; i++)
{
tb2.ImportRow(tb1.Rows[i]);
}
FROM TestTable
WHERE (ID NOT IN
(SELECT TOP 页大小*页数 id
FROM 表
ORDER BY id))
ORDER BY IDSELECT TOP 页大小 *
FROM TestTable
WHERE (ID >
(SELECT MAX(id)
FROM (SELECT TOP 页大小*页数 id
FROM 表
ORDER BY id) AS T))
ORDER BY ID
http://topic.csdn.net/u/20100812/15/1455d031-d9cc-44aa-ae7b-69802d922635.html
读出全部记录到tb表
DataTable tb1 = tb.Clone();//复制结构
DataTable tb2 = tb.Clone(); for (int i = 0; i < 50000; i++)
{
tb1.ImportRow(tb1.Rows[i]);
}
for (int i = 50000; i < 100000; i++)
{
tb2.ImportRow(tb1.Rows[i]);
} //排序
DataView dv = tb1.DefaultView;
dv.Sort = "字段 ASC,字段2 desc";
tb1=dv.ToTable(tb1);