September 20, 2010 at 4:05 pm
This is a very simple question but i m confused.
i have two versions of stored procedure and i think both of them are same.
Is there any difference between following two stored procedures?
CREATE PROCEDURE ProcName
AS
BEGIN
INSERT Statement
INSERT Statement
END
-------------------------------------------
CREATE PROCEDURE ProcName
AS
BEGIN
BEGIN TRAN
INSERT Statement
COMMIT TRAN
BEGIN TRAN
INSERT Statement
COMMIT TRAN
END
September 20, 2010 at 4:16 pm
No, there isn't... they've wrapped implicit transactions with explicit ones but didn't including anything extra. THIS would be different, however:
CREATE PROCEDURE ProcName
AS
BEGIN
BEGIN TRAN
INSERT Statement
INSERT Statement
COMMIT TRAN
END
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply