select ROW_NUMBER() over(order by b.userid)-1 num 
from UsersInfo,UsersInfo b

相关文章: