page++; string sql = "select top 1000 * from account_info where account not in (select top "; long i = 1000*page;; char str[256]; sprintf_s(str,"%ld",i); sql += str; sql += " account from account_info)";
如果有排序的话比较简单点。CString strSQL.Format(_T("select top 1000 * from (select top %ld * from 表名 order by 排序字段 desc) order by 排序字段 desc"), i*1000); i++;
string sql = "select top 1000 * from account_info where account not in (select top ";
long i = 1000*page;;
char str[256];
sprintf_s(str,"%ld",i);
sql += str;
sql += " account from account_info)";
(select top %ld * from 表名 order by 排序字段 desc)
order by 排序字段 desc"), i*1000);
i++;