Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个递归标量函数,它需要根据它返回的值更新另一个表中的记录,但是函数中不允许使用 UPDATE 语句。
如何从函数内更新表?
函数中不允许使用 UPDATE 语句
这就是规则——函数不允许有任何改变数据的副作用。
您必须使用存储过程来UPDATE.
UPDATE