SQL Server 2008 Updating VarChar Column with a UDF?
问题 I have a scalar function that takes a two variables @input1 @input2 and it returns the value of @input1 and @input2 (actual thing is more complex but this distills the idea). I want to update all rows in a table column using this function, passing the value 'abc ' for @input1 and using the column name in @input2, so my update statement would look something like: update mytable set mycolumn = (select dbo.myfunc( 'abc ' , mycolumn ) ) -- prepend the literal 'abc ' to every row for column