不墨迹,直接上代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace CutPage { //定义查询方法的委托.pageindex查询的页码:p…
第一种方法: select (@i:=@i+1) as i,table_name.* from table_name,(select @i:=0) as it 第二种方法: set @rownum=0;select @rownum:=@rownum+1 as rownum, t.username from auth_user t limit 1,5;…
方法1: SELECT @rownum :=@rownum + 1 AS rownum, t.* FROM integral_system_user t, (SELECT @rownum := 0) AS R; 例子: SELECT @ROWNUM :=@ROWNUM + 1 AS "ID", TB.* FROM ( SELECT c.`name` AS "编队名称", c.id AS "编队ID", b.user_id AS "用户I…