What Does UPDATE Mean?

The UPDATE statement is a Structured Query Language (SQL) statement used to change or update values in a table. It is usually suffixed with a WHERE clause to restrict the change to a set of values that meet a specific set of criteria.


Techopedia Explains UPDATE

The general syntax of an UPDATE statement is:

UPDATE table_name SET column1=value1, column2=value2 WHERE column=condition

For example, in the Customer_master table, if a change needs to be made to both Andrew Smith’s email address (to [email protected]) and his date of birth (to February 17, 1985), the syntax would be:

UPDATE customer_master SET email_addr=”[email protected]”, date_of_birth=”02.17.1985″ WHERE customer_name=”Andrew Smith”

Note the importance of the WHERE clause in acting as a restriction on which rows of data are to be changed. Without the WHERE clause, the statement will update the entire table, setting all customers’ email addresses to [email protected] and all customers’ dates of birth to February 17, 1985.

To update a table, a username must be granted the privilege to do so by the database administrator. Even while using an application, when data is changed (like Andrew Smith’s email address above), the application is really sending the equivalent UPDATE statement like the one above to execute on the database.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…