>>I do know that GO can only be used in SSMS and not in the application. But I was not sure where in the SSMS I should use GO between lines like UPDATE. Thank you.
>
>It's there to delimit batches. You may have a long script, which just can't be run all at once. SQL server specifically says that some commands can be run only as first in one batch - the batch being one trip to the server, or one sqlexec() call.
>
>So the script is cut into pieces which can run, and the GO keyword is the delimiter. A piece of script between two GO commands (or the first byte of script and the first GO) is executed in a single call, then the next one, then the next.
>
>You don't really need the GO, if your script doesn't have any of those "must be first" commands. Many M$ script generators insert it just in case, even when in most cases it's not necessary at all. And you can also, if you want to, execute a piece of script by selecting it and pressing F5 - the SMSS (and query analyzer before it) treat the selection as "piece of script to run now".
Thank you for the explanation. Now I just need to see some lines of code that, for example, would need to be run in the SSMS and
must have GO.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham