Database Restore Problem

  • The "GO" is not needed in this context, it's basically used to separate different batches of code. It's an old thing we inherited from the days of Sybase T-SQL on UNIX terminals. Back in those days, nothing would happen until you typed GO on a new line and hit enter, which would execute the preceding lines of SQL code. Today you usually don't really need the GO, but you can still use it as a batch separator within scripts. Basically, this will ensure that everything above the GO is executed and finished before you start doing anything below the GO. Practically, this means you can do stuff like reusing the same variables with different values, but you'll need to declare them again after each GO.


    Kind regards,

    Vegard Hagen
    Norwegian DBA, occasional blogger and generally a nice guy who believes the world is big enough for all of us.
    @vegard_hagen on Twitter
    Blog: Vegards corner (No actual SQL stuff here - havent found my niche yet. Maybe some day...)

    It is better to light a candle than to curse the darkness. (Chinese proverb)
  • Hi Vegard Hagen,

    Great. Thanks for the advise. 🙂

    - Peter

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply