The SQL statement for updating and deleting operations is relatively simple. However, when using UPDATE, pay attention to the limitations of the WEHER condition. the following statement only updates the email address with id 10005, if you do not apply the WHERE statement restriction, updating all emails in the table to elmer @ fuddcom for updating and deleting SQL statements is relatively simple. However, when using UPDATE, note the limitations of the WEHER condition. the following statement updates only the e-mail address with id 10005. if the WHERE statement restriction is not added, update all the emails in the table as elmer@fudd.com:
Delete the value of a column and set it to NULL.
Use DELETE to DELETE the SQL statement of a row. when using DELETE, add WHERE to DELETE the row you want to DELETE. If this parameter is not specified, all rows in the table will be deleted.
DELETE FROM MERS
WHERE cust_id = 10005;
Now we can see that the importance of the primary key of a table. In addition, before UPDATE and DELETE, you can use the SELECT statement to test whether the conditions specified by the WHERE statement are correct.