Join Bill Weinman for an in-depth discussion in this video Updating rows, part of MySQL Essential Training.
…The update statement is used to change data in existing rows in a table.…In this lesson, I'll be using the Scratch Database.…And, I'm continuing with the test table that I created in the previous lesson.…So if we say, SELECT * FROM test;, we can see the state of this.…And we'll go ahead and we'll update a row.…The update statement uses a where clause, just like the select statement.…So, sometimes I like to start with a select statement…with a where clause, like this, where a equals two.…
And then I know that my where clause is.…Selecting just the row that I want to change.…This prevents me from accidentally updating…rows that I don't intend to update.…So for example, here I can say, UPDATE test, SET C equals Extra Funny.…And we use that where clause that I've already typed and presumably debugged.…And then after this I can say select star from test, and we can see the result.…So there it is.…
Sense of humor, extra funny.…So you see that the.…Update statement is used to change the data.…I use the set clause here with the expression,…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- 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.