Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: syntax problem creating more than one table in a sql script
Try this in the script file :
create table scott.test (field char(20))
/
create table scott.test2 (field char(20))
/
Run it using @filename.
On Sun, 15 Nov 1998 18:04:45 GMT, mike_at_ward-murphy.demon.co.uk wrote:
>Your first two-line example is correct (i.e. with the semi-colon) and
>will run from sql*plus, but you have to make sure that it's saved as a
>file and you run it using @filename. For some reason, sql*plus won't
>run it if you just type it into the edit-buffer.
>
>Mike W-M
>
>
>>I want to create multiple sql tables with a script. If I do;
>>
>>create table scott.test (field char(20));
>>
>>this works, but with the same sql script I want to create two or more
>>tables, can someone help me with this. The following does not work.
>>
>>create table scott.test (field char(20));
>>create table scott.test2 (field char(20));
>>
>>or
>>create table scott.test (field char(20))
>>create table scott.test2 (field char(20));
>>
>>does not work either.
>>Any help would be apreciated.
>