Oracle分页语法
PagerAttributes.FieldCollection 列名 PagerAttributes.TableName 表名 PagerAttributes.SortFieldName 排序列名 PagerAttributes.SortDirection 排序方式 PagerAttributes.PageIndex 当前页 PagerAttributes.ItemsPerPage 每页显示大小 DataSet ds = new DataSet(); StringBuilder strSql = new StringBuilder(); strSql.Append(" SELECT *"); strSql.Append(" FROM ("); strSql.Append(" SELECT ROWNUM RN,t.* FROM "); strSql.Append(" ( SELECT " + PagerAttributes.FieldCollection); strSql.Append(" FROM " + PagerAttributes.TableName); strSql.Append(" WHERE " + PagerAttributes.DefaultWhere + searchCondition.BuildConditionSql().Replace("Where", "")); strSql.Append(" ORDER BY " + PagerAttributes.SortFieldName + " " + PagerAttributes.SortDirection asc desc); strSql.Append(") t "); strSql.Append(" WHERE ROWNUM<=" + Convert.ToString((PagerAttributes.PageIndex + 1) * PagerAttributes.ItemsPerPage)); strSql.Append(" ) "); strSql.Append(" WHERE RN>" + Convert.ToString((PagerAttributes.PageIndex) * PagerAttributes.ItemsPerPage)); ds = DbHelperOra.Query(strSql.ToString());