Update Table Row Number Sql Server Example

[Solved] Update Table Row Number Sql Server Example | Php - Code Explorer | yomemimo.com
Question : update table row number sql server example

Answered by : tee-pitakgul

With UpdateData As
(
SELECT RS_NOM,
ROW_NUMBER() OVER (ORDER BY [RS_NOM] DESC) AS RN
FROM DESTINATAIRE_TEMP
)
UPDATE DESTINATAIRE_TEMP SET CODE_DEST = RN
FROM DESTINATAIRE_TEMP
INNER JOIN UpdateData ON DESTINATAIRE_TEMP.RS_NOM = UpdateData.RS_NOM

Source : | Last Update : Fri, 05 Aug 22

Answers related to update table row number sql server example

Code Explorer Popular Question For Php