row_number() over(order by ...)

select t.rowid,
t.vchno,
ROW_NUMBER() OVER(ORDER BY to_number(t.vchno) ASC) AS XUHAO
from t_glvoucherfm t
where t.hsagency = ‘308’
and t.term = ‘12’
order by to_number(t.vchno);

猜你喜欢

转载自blog.csdn.net/waei08/article/details/79895518
今日推荐