Home >Database >Mysql Tutorial >存储过程删除主从表,回滚操作

存储过程删除主从表,回滚操作

WBOY
WBOYOriginal
2016-06-07 17:38:011247browse

用存储过程操作删除主从表记录,操作成功提交事务,失败回滚操作,避免删除异常误删数据。 . (@parameter1 int = 5,@parameter2 datatype OUTPUT) */ ( @FromCustomerID int , @CustomerType int , @Result int output) LightingControlSceneLevel ParadoxSc

用存储过程操作删除主从表记录,操作成功提交事务,失败回滚操作,避免删除异常误删数据。

. ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ ( @FromCustomerID int, @CustomerType int, @Result int output ) LightingControlSceneLevel ParadoxScene LightingControlSceneComfort LightingControlSceneStatus LightingControlScene LightingControlCircuit WHERE LCID IN (SELECT LCID FROM LightingControl WHERE CustomerID=@FromCustomerID) Alarm RXParam Device Comfort CCTVGroup Cctv Area ComfortRX ; ;

View Code

 

Statement:
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
Previous article: SQL Server数据类型Next article: 索引碎片