TOP ( ) Specifies one or more table hints that are allowed for a target table. @Note When referencing the Unicode character data types nchar, nvarchar, and ntext, 'expression' should be prefixed with the capital letter ' N'.If ' N' is not specified, SQL Server converts the string to the code page that corresponds to the default collation of the database or column.All other references to the object in the FROM clause must include an object alias.A view with an INSTEAD OF UPDATE trigger cannot be a target of an UPDATE with a FROM clause.Table1', ' U') IS NOT NULL DROP TABLE dbo. Table2', ' U') IS NOT NULL DROP TABLE dbo. Table1 (Col A int NOT NULL, Col B decimal(10,3) NOT NULL); GO CREATE TABLE dbo. If the UPDATE statement could change more than one row while updating both the clustering key and one or more text, ntext, or image columns, the partial update to these columns is executed as a full replacement of the values.Table2 (Col A int PRIMARY KEY NOT NULL, Col B decimal(10,3) NOT NULL); GO INSERT INTO dbo. Important The ntext, text, and image data types will be removed in a future version of Microsoft SQL Server.For example, a partial update of a varchar(max) column might delete or modify only the first 200 characters of the column, whereas a full update would delete or modify all the data in the column. WRITE updates that insert or append new data are minimally logged if the database recovery model is set to bulk-logged or simple.Minimal logging is not used when existing values are updated.
DEFAULT Specifies that the default value defined for the column is to replace the existing value in the column.
If the UPDATE statement affects multiple records, to return the old and new values for each record, use the OUTPUT clause. This can be configured in ODBC data sources or by setting connection attributes or properties.
Use caution when specifying the FROM clause to provide the criteria for the update operation. For more information, see SET ANSI_PADDING (Transact-SQL).
This can be more accurate than a searched update that uses a WHERE ] ) Specifies that optimizer hints are used to customize the way the Database Engine processes the statement. Avoid using these hints in this context in new development work, and plan to modify applications that currently use them.
For more information, see Query Hints (Transact-SQL). All char and nchar columns are right-padded to the defined length.