body language secrets a guide during courtship dating ebook - Ms sql updating multiple rows
triggers introduce fragmentation and increase tempdb load due to version store usage.
Triggers are running in context of transaction, increase the time in which locks are held and contribute to locking and blocking in the system.
In previous versions of SQL Server, if I needed to update numerous rows of data, I used a temporary table.
However, in some cases, we have to use triggers and it is important to develop them correctly.
SQL Server fires triggers on statement rather than row level.
For more information, see WITH common_table_expression (Transact-SQL). For information about table hints, see Table Hints (Transact-SQL).
TOP ( ) Specifies one or more table hints that are allowed for a target table. @ When referencing the Unicode character data types nchar, nvarchar, and ntext, 'expression' should be prefixed with the capital letter ' N'.
With table-valued parameters, available in SQL Server 2008, the update process is easy to implement and has little performance impact on the database.