sql事物
现要往3张表插入数据,想使用事物,该怎么写??
我传递的参是model
[解决办法]
- SQL code
begin trybegin traninsert into ainsert into binsert into bif xact_state() =1commit tranelserollback tranend end trybegin catchif xact_state()<>0rollback tranend catch
[解决办法]
[解决办法]
你这个问题可能不是提在SQL 区吧 。 你用的是什么?C#? Java? 还是其它什么 你想问的是这个吧。。。