The UPDATE statement is used to modify the contents of an existing row or the specific columns in a row in a table.
- [Narrator] To change data in a table use the … UPDATE statement. … Here we are continuing from the last lesson using the … "test" database and when I SELECT from the customer table, … I'll go ahead and I'll press F9 here and run the … SELECT statement and you notice that we have these … five rows. These last two were added in the last lesson. … Now if I want to change some of the data here, … like for example here in the row with the "id" number 5 … which is this one with Jimi Hendrix, … you notice that I have no address and I have no zip, … so I can change that. I can use the UPDATE statement … on the customer table and I can "SET address =" and … give it a value and "zip =" and give it a value. … And I say "WHERE id = 5." If I don't have that where clause … it's going to do it to the entire table, … so I want to limit it using a WHERE clause … to just the row or rows where I want to update the data. … So here I say "WHERE id = 5" … and the id column equals 5 just for that one row, …
This course was created by Bill Weinman. We are pleased to offer this training in our library.
- How databases are organized
- Selecting rows and columns
- Creating new tables
- Inserting and updating data
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Using CRUD functions
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times2m 6s
11. Views and Subselects
12. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.