Updating Data

This lesson discusses how to use the Update clause in MySQL.

We'll cover the following

Updating Data

We can use the UPDATE statement to change the value of a column for a row or multiple rows.

Example Syntax

UPDATE table

SET col1 = val1, col2 = val2, … coln = valn

WHERE <condition>

ORDER BY col5

LIMIT 5;

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy-paste the command ./DataJek/Lessons/15lesson.sh and wait for the mysql prompt to start-up.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.