Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Batching of SQL commands
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.
Received on Thu Aug 01 2002 - 07:16:32 CDT
![]() |
![]() |