0

We are using Oracle 11g to create our tables and database. If I create a table EX

CREATE TABLE  "ALIASES" 
   (    "ALIAS_ID" NUMBER(6), 
    "CRIMINAL_ID" NUMBER(6,0), 
    "ALIAS" VARCHAR2(20)
   ) ;

Then it creates the table fine, but when I try to create multiple tables at a time EX

CREATE TABLE  "ALIASES" 
   (    "ALIAS_ID" NUMBER(6), 
    "CRIMINAL_ID" NUMBER(6,0), 
    "ALIAS" VARCHAR2(20)
   ) ;



   CREATE TABLE  "CRIMINALS" 
   (    "CRIMINAL_ID" NUMBER(6,0), 
    "LAST" NUMBER(15,0), 
    "FIRST" NUMBER(10,0), 
    "STREET" VARCHAR2(10), 
    "CITY" VARCHAR2(20), 
    "STATE" CHAR(2), 
    "ZIP" CHAR(5), 
    "PHONE" CHAR(10), 
    "V_STATUS" CHAR(1), 
    "P_STATUS" CHAR(1)
   ) ;

then I get a ORA-00911: invalid character error. How can I get an error from 2 tables that both work if I did them seperately, but dont work if I do them together.

5
  • Where do you run these statements? Which SQL tool do you use? Maybe your SQL tool doesn't support running multiple statements? Commented Sep 16, 2015 at 6:09
  • We are using oracle 11g express edition. It is the only software the teacher said we would need.(SQL workshop) Commented Sep 16, 2015 at 6:11
  • 1
    Oracle 11g XE is not a "SQL client". It's the DBMS. You need to tell which tool you use to run the SQL statements (SQL*Plus, SQL Developer, some other tool...) Commented Sep 16, 2015 at 6:12
  • You can create two tables without a / .. I just checked on fiddle Commented Sep 16, 2015 at 6:27
  • We didnt actually have one I just downloaded SQL developer though Commented Sep 16, 2015 at 6:29

1 Answer 1

1

I copied Your code into file named test.sql then ran sqlplus, and got the answer:

SQL> @test

Table created.


Table created.

SQL>

Check the encoding of the file or the tool You use.

Sign up to request clarification or add additional context in comments.

3 Comments

this is the whole table chart if there is anyway you can see why it wont work with the full thing pastebin.com/6guMREXa
Unfortunatelly I'm behind the corporate firewall. Try run the script with Oracle sql developer and post the error.
I think I got it to work, so it was just my program couldnt process more then one table at a time, Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.