Update command in SQL

Saad Qureshi
A free video tutorial from Saad Qureshi
Computer Scientist || Freelancer || Programmer
3.9 instructor rating • 8 courses • 8,833 students

Learn more from the full course

SQLite Fundamentals - Comprehensive SQL course on SQLite

A comprehensive course on SQLite Fundamentals and SQL

04:53:21 of on-demand video • Updated August 2019

  • Learn to write SQL queries in SQLite database
  • Hands on experience of all the major concepts.
  • Answer variety of database problems through SQL
  • At the end of this course, You will be able to use SQL statements in any database management system.
English [Auto] In this lecture we are going to study update commanding the screen. So in a scale of debt command is used to modify the existing records in our table for example. This is my table project does not imply in this table I have a column card designation. This column contains null value so I'm going to update these values. Okay. Using our debt. Come on. So first I'm going to execute this particular query from going to use update command update. Project Dark imply designation so I'm going to update values of this particular column for the column name equals to manager there employee I.D. underscore I.D. in 1 2 3 1 2 4 1 2 5 1 2 6 so x gonna update records of this particular imply I do 120 3 4 5 6. So these 4 rules weren't printed 3 4 5 6. So the designation field of these four roles will be updated. So I'm going to have manager value inside the designation field so let's execute this query okay for roads have been updated. Now check select start from Project Dark imply for execute this query look these photos have been updated. Now I'm going to update these values 137 eight and nine. Okay. Their designation equals two. Director very employee idea in 127 128 and 129 so it's gone get designation fee that imply ideas 127 or 128 or 129 so it's just gonna update these three rules. Okay so I'm going to have value director here. Okay so designation free will be director. So let's execute Discovery now. Query has been successfully executed. Execute this part of query look. Director field has been updated. So there imply ideas 1 currently 7 8 and 9. So these rules will be updated. Okay. So using update command I can update multiple columns as that. For example if I want to update first and last name of this particular table I can use update command. Okay. So update project dart employee SEC. First underscore name equals to Fletcher Bob Goma last name be quote to let's say Vince where implied equals to 123. So it's gonna update first and last name of this particular rule because I have specified this particular condition very employee ideas 123. So it's gonna update this particular rule. Okay. So let's execute this query so execute this part of query okay. Now Bob anvils so this row has been updated. Okay. So this is the concept of update command that it can be used to update records in a table.