Updating a column in sql

We have already seen how to limit the rows being updated by using the WHERE clause.You can also limit the rows being updated using the TOP clause.Here is an example where I specified the WHERE clause incorrectly and I updated too many rows: Here I updated Toy Name on two rows, the “Silver Magic” and the “Super Surfer” Toyname rows.If you are not exactly sure what rows will be returned by your WHERE clause of an UPDATE statement, it best to take some precautions prior to executing your UPDATE statement.

Suppose I wanted to change both the Toy Name and the Price columns.

When you sign in to comment, IBM will provide your email, first name and last name to DISQUS.

That information, along with your comments, will be governed by DISQUS’ privacy policy.

There are multiple ways to use the UPDATE statement to update a SQL Server table.

In this article I will show you the most common methods of using the UPDATE statement.