Link to home
Create AccountLog in
Avatar of valmatic
valmaticFlag for United States of America

asked on

Is it necessary to include "BEGIN" and "END" statements in a SQL script?

Hi.  A programmer came in and helped us generate a lot of SQL code.  I'm a novice SQL user but I can follow along and decipher what steps are being performed so am reviewing to understand the general flow of the application better.  I noticed that in many places the programmer did not use BEGIN and END statements, while in other places, they are being used.  Is this just good syntax or are these statements required to perform some functions while others, not so much?  A couple of the Sprocs with these statements included are simply calling out table updates but same thing is happening in another sproc and the begin/end statement are not used.  thanks
ASKER CERTIFIED SOLUTION
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of valmatic

ASKER

Thanks so much for the quick responses.  Exactly what I wanted to know for my own growing knowledge.  
Bishop, I know you said no points but it's just good form man..  Plus your insight is great.  :)