开发者

Need to update table row from UDF in SQL Server

开发者 https://www.devze.com 2022-12-17 08:08 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号