O'Reilly logo

Microsoft® SQL Server™ 2005: Database Essentials Step by Step by Solid Quality Learning

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Updating Data from Microsoft SQL Server 2005

After completing this chapter, you will be able to:

  • Update information in your databases

  • Manage update issues by using triggers

  • Use ADO.NET components to perform update operations

Using the UPDATE Statement

You use the UPDATE statement to modify information in your data tables. The basic syntax for updates is the following:

UPDATE [<ServerName>].[<Database>].[<Schema>].[<TableName>]
   SET [<ColumnName>] = <NewValue>>
      ,....
 WHERE <Search Conditions,,>

As usual, if you execute the UPDATE sentence with a connection to the current database, you can simply use the <SchemaName>.<TableName> form without including the server and database names.

You can use the UPDATE sentence without a WHERE condition. A ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required