Home > Database > Mysql Tutorial > body text

PB+MSSQL+触发器必须注意

WBOY
Release: 2016-06-07 16:06:26
Original
1323 people have browsed it

PB+MS SQL+触发器必须注意: 若触发器存在两笔以上的返回值,比如两条update 语句,被误判为数据有改变,存盘不成功。 提示: Row changed between retrieve and update. No changes made to database. 所以MS SQL 触发器必须统一处理为: 触发器开始加: if

PB+MS SQL+触发器必须注意:

若触发器存在两笔以上的返回值,比如两条update 语句,被误判为数据有改变,存盘不成功。

提示:

Row changed between retrieve and update.

No changes made to database.

所以MS SQL 触发器必须统一处理为:

触发器开始加:

if@@ROWCOUNT=0 Return --提高效能

setnocount on --不返回统计笔数,可减少网络频繁响应,提高效性能;避免误判为数据有改变(sybase不存在此类问题)

结束加:

setnocount off

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template