Ms sql updating one table from another personality traits women who are accommodating and self conscious
Below is an example that does this: I updated the Toy Name and the Price for the Toy row with an ID value of 4, which was my original Super Surfer row.
I did this by having a single SET clause in my UPDATE statement, with the two column name/value pairs separated with a comma.
I can update multiple columns with a single UPDATE statement.
I can do that with the following code: In this code I updated the Toy table based on values in another table, in this case a table named New Toy Price.
To accomplish that I joined the TOY table to my New Toy Price table based on the ID column.
By doing this I can see what my WHERE condition will return to make sure it identifies the same rows I want to update.
Once my SELECT statement does return the correct rows I can then copy the WHERE clause from my SELECT statement, and paste it into my UDPATE statement code.