forked from docs/doc-exports
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>
1.8 KiB
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;
Parent topic: UPDATE