SQL Course: a Query to UPDATE Your Data

Publicado em: 12 Julho 2025
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line SQL Course: a Query to UPDATE Your Data duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Database Dive 12 Julho 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 15 vezes e gostou 1 espectadores. Boa visualização!