prismaticorb prismaticorb - 1 year ago 59
SQL Question

Why should I use GO command in sybase?

Why should I use

when writing sql for sybase? In most of the existing sql my project has, there are no GOs but when DDL is generated for table creation, as an example, the application inserts many GO statements.

Thanks to the answers, I understand that
is similar to
in other databases, as people have helpfully pointed out it is a Delimiter.

An added question then, is
in sybase exactly equivalent to typing
in Oracle?

Answer Source

It's a batch separator. GO is used to tell the engine to process everything after the word GO as a new command in a batch.

CREATE PROC usp_blah as ...

CREATE some-otherproc as ...

Without GO, the optimizer would throw an error at the second CREATE statement

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download