ALERT

[WEBINAR] Building a Business-Driven Data Architecture

UPDATE

Definition - 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 asmith@gmail.com) and his date of birth (to February 17, 1985), the syntax would be:

UPDATE customer_master SET email_addr="asmith@gmail.com", 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 asmith@gmail.com 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.

This definition was written in the context of SQL

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
Tweat cdn.techopedia.com
"Techopedia" on Twitter


'@Techopedia'
Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Resources
Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.