From the course: Complete Guide to SQL for Data Engineering: from Beginner to Advanced

Unlock the full course today

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

Updating existing records

Updating existing records

- [Instructor] Updation. Sometimes you have the records available in your table and you don't want to insert the entirely new record, but you want to change some specific column value for some specific rules. In that case, you can do the updation or you can use the power of update statement in SQL. Let's just go to our pgAdmin and see how we can do that. Let's open up a new query tool. Now, in the previous video, we have added a new record that was an iPad, and if I still show you the value which we have given for that iPad, the price which we have given for that iPad was a $100. Now I feel that $100 is a wrong price, right? A iPad should cost somewhere around $500. Let us see how I can make this error correction using the update statement. There is a keyword called update, or you call update clause. So you say update, you give the table name. So here the table name is products, and then you use another keyword called set,…

Contents