Developing By Me

Project Development and Design


    The UPDATE is used almost as often as the SELECT as this is how data is manipulated or modified within the database. The syntax is fairly simple and similar to other queries. The UPDATE statement does not require the WHERE clause however it is critical that one is provided. Without the WHERE clause the UPDATE statement will overwrite every row within the table with the new value. This is not something that is desired and can corrupt the whole table if the wrong field is overwritten by a blanket statement. This type of update should only be used by the DBA to fix bulk data that is incorrect. However, simple updates like fixing a single row or category of rows can be done through the standard syntax.


UPDATE table1
SET field2 = value2, field3 = value3
WHERE field1 = value1