doc-exports/docs/dws/tool/dws_16_0195.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:35:25 +00:00

1.8 KiB

ORDER BY

In MySQL, if an UPDATE statement includes an ORDER BY clause, the rows will be updated in the order specified by the clause.

Input

# ORDER BY 
UPDATE  employees SET department_id=department_id+1  ORDER BY id;

Output

-- ORDER BY 
UPDATE "public"."employees" SET "department_id" = department_id+1;