MySQL has types of queries designed specifically to update already-existing data in the database. Learn how to use UPDATE queries with the REPLACE function to automatically find and change text in the database.
- [Instructor] The next step in the challenge…is to update the database by capitalizing…every occurrence of a character's name.…Once again, we'll be using our list of characters…and iterating through it to find occurrences…of that character's name in our amnd table,…and then updating each record that contains…the character name using the MySQL REPLACE function.…UPDATE syntax is a bit different than inserting or creating.…I've created a new table to demonstrate…how UPDATE queries work.…It has all the same contents as…the amnd table we created earlier.…I want to demonstrate on a disposable dataset…and then we'll update our actual dataset…using a Python script.…
So I'll open up a new SQL tab…and I will start with UPDATE…and then the table name I want to update,…in this case, amnd_temp,…and then the value I want to update.…I want to SET play_text to capitalize…the name of characters and to do that,…I'm going to use the REPLACE function in MySQL.…So I want to set this equal to REPLACE,…And that REPLACE takes the value you want to update,…
- Strengths and weaknesses of MySQL
- Creating a database
- Joining data sets
- Integrating Python with MySQL
- Searching a database
- CRUD operations
- Performing calculations
Skill Level Appropriate for all
1. Data and MySQL in under Five Minutes
2. Create a Database
3. Join Two Datasets
4. Search a Database
Searching a database1m 51s
5. Create, Read, Update, and Delete Operations
6. Averages and Calculations
Next steps1m 1s
- 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.