Sql Begin End Kullanımı. Begin and end are used in transact sql to group a set of statements into a single compound statement so that control statements such as if. But since you then will hold locks for a longer period you will.

If statements can by definition only take a single sql statement. In the case of sql server the if statement is used to execute sql statements if a condition is true. But since you then will hold locks for a longer period you will.
If a condition is not satisfied false then optionally else statement can be used.
End syntax is used for writing compound statements which can appear within stored programs stored procedures and functions triggers and events. To define a statement block use the control of flow keywords begin and end. Of them but not only half of them user defined transactions is the way. Begin and end are control of flow language keywords.