Brandon Schiff
Brandon Schiff

Reputation: 3

SQL creating table error

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.

Upvotes: 0

Views: 54

Answers (1)

Mindaugas Tamosevicius
Mindaugas Tamosevicius

Reputation: 172

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.

Upvotes: 1

Related Questions