Select a.*,(@rowNum:=@rowNum+1) as rowNo
From a,
(Select (@rowNum :=0) ) b
oracle :
select a.*,rownum from a
sql server :
select row_number()over(order by XX)as RowNum,* from a
欢迎分享,转载请注明来源:内存溢出
Select a.*,(@rowNum:=@rowNum+1) as rowNo
From a,
(Select (@rowNum :=0) ) b
oracle :
select a.*,rownum from a
sql server :
select row_number()over(order by XX)as RowNum,* from a
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)