OUTPUT Clause
This one gives you access to the inserted and deleted tables in normal SQL so you can write statements like:
DECLARE @changes TABLE ( ProjectId int, Name nvarchar(max), Description nvarchar(max));update dbo.Projectsset Billable = 1output inserted.ProjectId, inserted.Name, inserted.Description into @changeswhere Billable = 0
WRITE Clause
Allows more efficient updates of varchar(max), nvarchar(max) and varbinary(max) columns. For example:
declare @update_text nvarchar(max)set @update_text = ' ... this is added to the end'update dbo.Projectsset Description.write(@update_text, null, len(@update_text))where Name = 'Timesheet'
Page rendered at Saturday, February 11, 2012 4:28:53 PM (GMT Standard Time, UTC+00:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.