I have a stored procedure (SQL Server) which does nothing more than updates a single row in a table.
Does adding BEGIN TRANSACTION and COMMIT TRANSACTION before/after the update have any effect at all?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. Transactions ensure that a set of modifying statements are atomic, namely that either all steps succeed or all steps fail. In case there is only one statement, there is no need to use transactions anymore ..
Anyway, T-SQL does that automaticaly. That’s why they called it Transact SQL …