If it didn't have this order and My SQL tried to do the increment from first row (making 1 into 2), it will throw an error since ID number 2 already exists (`id` has to be unique since it's the primary key).You can make My SQL increment the ID of only the last two rows by specifying a LIMIT clause as below.
Result sets listed in this article (except for amending values section) have been generated in that way and by executing SELECT statements (SELECT * FROM `employee`) in command-line.
Following is how to update the salary of an employee whose ID is 3.
The ELSE case will let us keep the original value if we don’t explicitly provide one.
The WHERE will limit our updates to the rows we are trying to update.
You can run UPDATE statements in My SQL command-line, in a GUI tool or with mysqli_query() in a PHP script.