I am using a function in the view for getting some result sets. In that function, based on some condition need to update rows to t开发者_StackOverflow中文版he database table.
Can anyone tell me, How can I do this
You cannot do this using SQL Server. SQL Server does not allow Update/Delete/Insert statements in UDFs. I think you are also prevented from calling a stored procedure as well.
SPs can read, write, delete, and update permanent tables.But you must be considerable if you wanna update rows in the base table (tables) of the view because there are some restrictions
精彩评论