客戶id進行排序,生成一個rowid,該如何實現呢?
藉助row_number函數及over來實現生成rowid:
select cust_no,row_number over (order by cust_no) from cust_into;
1001 1
1002 2
1003 3
1004 4
......
僅供參考!
藉助row_number函數及over來實現生成rowid:
select cust_no,row_number over (order by cust_no) from cust_into;
1001 1
1002 2
1003 3
1004 4
......