开发者

Need to update table row from UDF in SQL Server

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜