From the course: Learning Azure SQL Querying

Unlock the full course today

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

Using an UPDATE statement to change a record

Using an UPDATE statement to change a record - Azure Tutorial

From the course: Learning Azure SQL Querying

Using an UPDATE statement to change a record

- [Instructor] Do you remember when we inserted a green helmet in our product table? When we put that record into the database, we didn't set a value for the color field so that field is currently null for that record. Let's change that record and cover the U in CRUD, which is update. Click the New Query button. Let's start by selecting the green helmet so that we can look at it before we update it. Type SELECT* FROM and then type product and let it autofill the full product table name. Then type WHERE Name LIKE and then in single quotes, let's put percent sign, capital G, Green, and then closing percent sign, and then run that query. If you scroll over in the query results, you'll see that the color column is blank and that this field in our database is null for this row. To update it in the query editor, hit Enter twice and let's work on this query in the same query tab. Type the keyword UPDATE, then the name…

Contents