如何编写具有多个插入的sp并像提交回滚CONCEPT一样工作? [英] How to write sp with multiple inserts and work like commit rollback CONCEPT ?
本文介绍了如何编写具有多个插入的sp并像提交回滚CONCEPT一样工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
像提交回滚"一样,我应该编写一个SP来执行多个插入.
注意:我应该检查所有这些多重插入是否成功或
否则应该回滚.
向我建议任何不错的网站来学习sp并编写sp
在此先感谢
Naveen ...:rolleyes:
Hi all ,
Like Commit Roll back ,I should write an SP to execute multiple inserts.
NOTE : I should check whether all those mutiple inserts were successfull or
else it should rol back.
Suggest me any nice website to learn sp and writing sp
Thanks in advance
Naveen... :rolleyes:
推荐答案
您在这里:
存储过程 [ TRY ... CATCH(Transact-SQL) [开始交易(Transact-SQL) [
Here you go:
Stored Procedures[^]
TRY...CATCH (Transact-SQL)[^]
BEGIN TRANSACTION (Transact-SQL)[^]
You need to learn on Try-Catch first. Then Learn on Transaction. And then abot Stored Procedure.
Steps:
1. Use Try Catch
2. Implement Transactions in Try Catch
3. Use Stored Procedure in Transaction.
您好,Sandeep
谢谢您的回应
但是您发布的答案对我来说似乎更高.
我已经在vb.net和c#中学习了TRY CATCH.但是
我想知道,如何编写SP,
存储过程对多个insert语句执行
并像Commit Roll Back Concept一样工作.
希望你理解我的问题
希望很快能收到您的回音
在此先感谢
Naveen ...:confused:
Hi Sandeep
Thank you for your response
But the answer u posted is like quite higher for me.
I have learnt TRY CATCH in vb.net and c # .But
I want to know ,how to write SP,
Stored Procedure to multiple insert statements execute
and work like Commit Roll Back Concept .
Hope you understand my problem
and hope to hear from you soon
Thanks in advance
Naveen...:confused:
这篇关于如何编写具有多个插入的sp并像提交回滚CONCEPT一样工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文