Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Batching of SQL commands
In article <260f35b8.0208010416.66b5156b_at_posting.google.com>,
simonp_at_tesseract.co.uk says...
> Hi,
>
> First post from a newbie so go easy! I'm accessing through Google Groups and
> couldn't find a FAQ for this group so apologies if this question has been asked
> a 100 times before.
>
> In MS SQL I can group several statements together in a single file, open this
> file in Query Analyzer and run it, for example:
>
> CREATE TABLE FIRST (<table definition>)
> GO
> CREATE TABLE SECOND (<table definition>)
> GO
> CREATE TABLE THIRD (<table definition>)
> GO
>
> This works fine and creates three tables.
>
> If I try the same kind of thing in SQL Plus, for example:
>
> CREATE TABLE FIRST (<table definition>)
> CREATE TABLE SECOND (<table definition>)
> CREATE TABLE THIRD (<table definition>)
>
> I get a "Missing or invalid option" error at the CREATE TABLE SECOND line. I
> tried wrapping these statements in a BEGIN...END; block but that didn't help. I
> also get the same kind of problem when batching multiple ALTER TABLE statements.
>
> Can anyone help?
>
> Regards,
> Simon.
>
Search/Replace "GO" with "/"
![]() |
![]() |