SQL Course: a Query to UPDATE Your Data

Veröffentlicht am: 12 Juli 2025
auf dem Kanal: Database Dive
15
1

Timestamps for this SQL course:
00:00: Introduction to the UPDATE SQL Query
01:33: Filtering Rows to Update with the WHERE SQL Clause
03:03: Updating Multiple Columns

Welcome to this full SQL course on the UPDATE SQL query! This SQL course will walk you through the basics of updating data in relational database management systems like MySQL.

In its most basic form, the UPDATE SQL query looks like so:
UPDATE `table` SET `column` = 'Value';

The problem with this SQL query, though, is if we execute this SQL query, all of our rows in a column will be updated because we didn't specify a WHERE clause.
Some SQL clients like Arctype, DbVisualizer, or phpMyAdmin (if we're running MySQL Server) will inform us about the consequences of our actions before we execute such a SQL query, others won't.

To avoid updating all rows in a table, use the SQL UPDATE query together with the WHERE clause - the WHERE clause lets you specify what specifically to update:
UPDATE `table` SET `column` = 'Value' WHERE [condition];

If you want to update a specific set of data, say, a row of ID 7, you would invoke the SQL UPDATE query like so:
UPDATE `table` SET `column` = 'Value' WHERE `id` = 7;

Now your database will understand the SQL query properly and it will no longer update the entire table. Execute the SQL query once again and one row will be affected.

To update multiple columns, utilize the UPDATE SQL query like so:
UPDATE `table` SET `column` = 'Value', `column_2` = 'Value 2', ... WHERE `id` = 7;

Basically, specify the columns to update the data in after the comma.

Music:
Future by KV:    / kvmusicprod  
License: Creative Commons. Attribution 3.0 Unported. CC BY 3.0
Free Download / Stream: https://www.audiolibrary.com.co/kv/fu...
Music promoted by Audio Library:    • Chill, Lofi, Electronic No Copyright Music...  

#coding #database #sql #programming #mysql


Auf dieser Seite können Sie das Online-Video SQL Course: a Query to UPDATE Your Data mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Database Dive 12 Juli 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 15 Mal angesehen und es wurde von 1 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!