Pages
(移至...)
Facebook小講堂詢問處
▼
2016-09-14
〔SQL〕一次重新設定流水序號 / UPDATE ROW_NUMBER()
範例:執行將依據指定排序條件,將特定欄位重設流水序號
WITH
UT
as
(
SELECT
SCode
,
L
,
ROW_NUMBER
()
OVER
(
ORDER
BY
SCODE
)
as
RN
FROM
SP03
WHERE
sp02_scode
=
100
)
UPDATE
UT
SET
L
=
RN
‹
›
首頁
查看網路版