string sqlSr = "select * from (select rownum rn,a.* from(select * from " + TableNameSr + " where " + TimeFieldSr + "> to_date('" + LastTimeTr + "','YYYY-MM-DD HH24:MI:SS') order by rownum) a where ROWNUM < =" + ei.ToString() + ") where rn >" + si.ToString();
ei 是最高值
si 是最低值