From the course: SQL Essential Training

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Updating data

Updating data

Now, the UPDATE statement is used to modify existing data in a table. Now, the UPDATE is generally used with the WHERE clause. The WHERE clause is used to specify the particular row of data that you want to update. Now, without the WHERE clause, the UPDATE statement will actually update every single row in a table. So, including the WHERE clause is pretty important when it comes to updating your data. Now, let's take a look at how we would update the record that we just placed in our table, which was to update the artist table with the artist Bob Marley. The management at WSDA Music has just sent word that they actually made an error. instead of Bob Marley, they actually wanted to add his son Damian Marley. So let's actually see how we would update our record and perform this update. Now the first step we would want to do is go back to our Browse Data tab and remind ourselves what actually was that artist ID that was added when we added our new record. And if we look down here, we see…

Contents