日期:2014-05-18 浏览次数:20481 次
declare @total int set @total=0 select @total=count(1) from PRO_Priorflow where 1=1 and recordtime between '2012-03-29' and '2012-04-01' SELECT TOP 15 * FROM (SELECT ROW_NUMBER() OVER (ORDER BY id) AS RowNumber,* FROM PRO_Priorflow where 1=1 and recordtime between '2012-03-29' and '2012-04-01' ) A WHERE RowNumber >0
SqlParameter[] parameters = { SQLHelper.CreateOutParam("@total",SqlDbType.Int, 8) }; dt = SQLHelper.GetDt(sqlstr, parameters); totalrows = Convert.ToInt32(parameters[0].Value);