Increasingly I see other people's code using ";" to terminal some/most/all statements inside an Sproc. Why?
With the exception of
; WITH MyCTE AS ...
I never use ";". Its an annoyance if I want to add another AND to the end, or another line for an additional ORDER BY column, or whatever.
It also mucks up the Control-Right-Arrow "word hopping" behaviour in my editor.
But perhaps I'm missing something ... does the Query Planner split the Sproc into "chunks" according to each defined statement?
or is the parser faster because it doesn't have to read-ahead before it can determine where an individual statement starts / ends?
or is it a more "defensive coding" technique because there is no chance of a statement accidentally being parsed in-with the following statement?
Or something else?
Do you use ";" after every statement in an Sproc? and if so why? (e.g a description of why your Coding Standards decided that that suited our company )